Subversion Repositories SmartDukaan

Rev

Rev 6050 | Rev 6486 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6050 Rev 6228
Line 148... Line 148...
148
    Parameters:
148
    Parameters:
149
     - merchantPaymentId
149
     - merchantPaymentId
150
    """
150
    """
151
    pass
151
    pass
152
 
152
 
153
  def doHdfcPaymentForDigitalOrder(self, merchantPaymentId, rechargeOrderId):
153
  def doHdfcPaymentForDigitalOrder(self, merchantPaymentId, rechargeOrderId, phone):
154
    """
154
    """
155
    Initialize the payment pipe for a HDFC payment in case of a digital order. The URL the user should be redirected to is returned.
155
    Initialize the payment pipe for a HDFC payment in case of a digital order. The URL the user should be redirected to is returned.
156
    In case of any processing error, an exception is raised.
156
    In case of any processing error, an exception is raised. The phone is a madatory field and is required in case of dth payments.
157
 
157
 
158
    Parameters:
158
    Parameters:
159
     - merchantPaymentId
159
     - merchantPaymentId
160
     - rechargeOrderId
160
     - rechargeOrderId
-
 
161
     - phone
161
    """
162
    """
162
    pass
163
    pass
163
 
164
 
164
  def initializeHdfcEmiPayment(self, merchantPaymentId):
165
  def initializeHdfcEmiPayment(self, merchantPaymentId):
165
    """
166
    """
Line 696... Line 697...
696
      return result.success
697
      return result.success
697
    if result.pe is not None:
698
    if result.pe is not None:
698
      raise result.pe
699
      raise result.pe
699
    raise TApplicationException(TApplicationException.MISSING_RESULT, "initializeHdfcPayment failed: unknown result");
700
    raise TApplicationException(TApplicationException.MISSING_RESULT, "initializeHdfcPayment failed: unknown result");
700
 
701
 
701
  def doHdfcPaymentForDigitalOrder(self, merchantPaymentId, rechargeOrderId):
702
  def doHdfcPaymentForDigitalOrder(self, merchantPaymentId, rechargeOrderId, phone):
702
    """
703
    """
703
    Initialize the payment pipe for a HDFC payment in case of a digital order. The URL the user should be redirected to is returned.
704
    Initialize the payment pipe for a HDFC payment in case of a digital order. The URL the user should be redirected to is returned.
704
    In case of any processing error, an exception is raised.
705
    In case of any processing error, an exception is raised. The phone is a madatory field and is required in case of dth payments.
705
 
706
 
706
    Parameters:
707
    Parameters:
707
     - merchantPaymentId
708
     - merchantPaymentId
708
     - rechargeOrderId
709
     - rechargeOrderId
-
 
710
     - phone
709
    """
711
    """
710
    self.send_doHdfcPaymentForDigitalOrder(merchantPaymentId, rechargeOrderId)
712
    self.send_doHdfcPaymentForDigitalOrder(merchantPaymentId, rechargeOrderId, phone)
711
    return self.recv_doHdfcPaymentForDigitalOrder()
713
    return self.recv_doHdfcPaymentForDigitalOrder()
712
 
714
 
713
  def send_doHdfcPaymentForDigitalOrder(self, merchantPaymentId, rechargeOrderId):
715
  def send_doHdfcPaymentForDigitalOrder(self, merchantPaymentId, rechargeOrderId, phone):
714
    self._oprot.writeMessageBegin('doHdfcPaymentForDigitalOrder', TMessageType.CALL, self._seqid)
716
    self._oprot.writeMessageBegin('doHdfcPaymentForDigitalOrder', TMessageType.CALL, self._seqid)
715
    args = doHdfcPaymentForDigitalOrder_args()
717
    args = doHdfcPaymentForDigitalOrder_args()
716
    args.merchantPaymentId = merchantPaymentId
718
    args.merchantPaymentId = merchantPaymentId
717
    args.rechargeOrderId = rechargeOrderId
719
    args.rechargeOrderId = rechargeOrderId
-
 
720
    args.phone = phone
718
    args.write(self._oprot)
721
    args.write(self._oprot)
719
    self._oprot.writeMessageEnd()
722
    self._oprot.writeMessageEnd()
720
    self._oprot.trans.flush()
723
    self._oprot.trans.flush()
721
 
724
 
722
  def recv_doHdfcPaymentForDigitalOrder(self, ):
725
  def recv_doHdfcPaymentForDigitalOrder(self, ):
Line 1173... Line 1176...
1173
    args = doHdfcPaymentForDigitalOrder_args()
1176
    args = doHdfcPaymentForDigitalOrder_args()
1174
    args.read(iprot)
1177
    args.read(iprot)
1175
    iprot.readMessageEnd()
1178
    iprot.readMessageEnd()
1176
    result = doHdfcPaymentForDigitalOrder_result()
1179
    result = doHdfcPaymentForDigitalOrder_result()
1177
    try:
1180
    try:
1178
      result.success = self._handler.doHdfcPaymentForDigitalOrder(args.merchantPaymentId, args.rechargeOrderId)
1181
      result.success = self._handler.doHdfcPaymentForDigitalOrder(args.merchantPaymentId, args.rechargeOrderId, args.phone)
1179
    except PaymentException, pe:
1182
    except PaymentException, pe:
1180
      result.pe = pe
1183
      result.pe = pe
1181
    oprot.writeMessageBegin("doHdfcPaymentForDigitalOrder", TMessageType.REPLY, seqid)
1184
    oprot.writeMessageBegin("doHdfcPaymentForDigitalOrder", TMessageType.REPLY, seqid)
1182
    result.write(oprot)
1185
    result.write(oprot)
1183
    oprot.writeMessageEnd()
1186
    oprot.writeMessageEnd()
Line 3155... Line 3158...
3155
class doHdfcPaymentForDigitalOrder_args:
3158
class doHdfcPaymentForDigitalOrder_args:
3156
  """
3159
  """
3157
  Attributes:
3160
  Attributes:
3158
   - merchantPaymentId
3161
   - merchantPaymentId
3159
   - rechargeOrderId
3162
   - rechargeOrderId
-
 
3163
   - phone
3160
  """
3164
  """
3161
 
3165
 
3162
  thrift_spec = (
3166
  thrift_spec = None
3163
    None, # 0
-
 
3164
    (1, TType.I64, 'merchantPaymentId', None, None, ), # 1
-
 
3165
    (2, TType.I64, 'rechargeOrderId', None, None, ), # 2
-
 
3166
  )
-
 
3167
 
-
 
3168
  def __init__(self, merchantPaymentId=None, rechargeOrderId=None,):
3167
  def __init__(self, merchantPaymentId=None, rechargeOrderId=None, phone=None,):
3169
    self.merchantPaymentId = merchantPaymentId
3168
    self.merchantPaymentId = merchantPaymentId
3170
    self.rechargeOrderId = rechargeOrderId
3169
    self.rechargeOrderId = rechargeOrderId
-
 
3170
    self.phone = phone
3171
 
3171
 
3172
  def read(self, iprot):
3172
  def read(self, iprot):
3173
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3173
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3174
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3174
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3175
      return
3175
      return
Line 3186... Line 3186...
3186
      elif fid == 2:
3186
      elif fid == 2:
3187
        if ftype == TType.I64:
3187
        if ftype == TType.I64:
3188
          self.rechargeOrderId = iprot.readI64();
3188
          self.rechargeOrderId = iprot.readI64();
3189
        else:
3189
        else:
3190
          iprot.skip(ftype)
3190
          iprot.skip(ftype)
-
 
3191
      elif fid == -1:
-
 
3192
        if ftype == TType.STRING:
-
 
3193
          self.phone = iprot.readString();
-
 
3194
        else:
-
 
3195
          iprot.skip(ftype)
3191
      else:
3196
      else:
3192
        iprot.skip(ftype)
3197
        iprot.skip(ftype)
3193
      iprot.readFieldEnd()
3198
      iprot.readFieldEnd()
3194
    iprot.readStructEnd()
3199
    iprot.readStructEnd()
3195
 
3200
 
3196
  def write(self, oprot):
3201
  def write(self, oprot):
3197
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3202
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3198
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3203
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3199
      return
3204
      return
3200
    oprot.writeStructBegin('doHdfcPaymentForDigitalOrder_args')
3205
    oprot.writeStructBegin('doHdfcPaymentForDigitalOrder_args')
-
 
3206
    if self.phone is not None:
-
 
3207
      oprot.writeFieldBegin('phone', TType.STRING, -1)
-
 
3208
      oprot.writeString(self.phone)
-
 
3209
      oprot.writeFieldEnd()
3201
    if self.merchantPaymentId is not None:
3210
    if self.merchantPaymentId is not None:
3202
      oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)
3211
      oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)
3203
      oprot.writeI64(self.merchantPaymentId)
3212
      oprot.writeI64(self.merchantPaymentId)
3204
      oprot.writeFieldEnd()
3213
      oprot.writeFieldEnd()
3205
    if self.rechargeOrderId is not None:
3214
    if self.rechargeOrderId is not None: