Subversion Repositories SmartDukaan

Rev

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

Rev 765 Rev 1120
Line 90... Line 90...
90
    Parameters:
90
    Parameters:
91
     - txnId
91
     - txnId
92
    """
92
    """
93
    pass
93
    pass
94
 
94
 
95
  def updatePaymentDetails(self, id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, attributes):
95
  def updatePaymentDetails(self, id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes):
96
    """
96
    """
97
    mark payment successful and store parameters
97
    mark payment successful and store parameters
98
    
98
    
99
    
99
    
100
    Parameters:
100
    Parameters:
Line 106... Line 106...
106
     - gatewayTxnId
106
     - gatewayTxnId
107
     - authCode
107
     - authCode
108
     - referenceCode
108
     - referenceCode
109
     - errorCode
109
     - errorCode
110
     - status
110
     - status
-
 
111
     - gatewayTxnDate
111
     - attributes
112
     - attributes
112
    """
113
    """
113
    pass
114
    pass
114
 
115
 
115
 
116
 
Line 374... Line 375...
374
      return result.success
375
      return result.success
375
    if result.pe != None:
376
    if result.pe != None:
376
      raise result.pe
377
      raise result.pe
377
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentForTxnId failed: unknown result");
378
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentForTxnId failed: unknown result");
378
 
379
 
379
  def updatePaymentDetails(self, id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, attributes):
380
  def updatePaymentDetails(self, id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes):
380
    """
381
    """
381
    mark payment successful and store parameters
382
    mark payment successful and store parameters
382
    
383
    
383
    
384
    
384
    Parameters:
385
    Parameters:
Line 390... Line 391...
390
     - gatewayTxnId
391
     - gatewayTxnId
391
     - authCode
392
     - authCode
392
     - referenceCode
393
     - referenceCode
393
     - errorCode
394
     - errorCode
394
     - status
395
     - status
-
 
396
     - gatewayTxnDate
395
     - attributes
397
     - attributes
396
    """
398
    """
397
    self.send_updatePaymentDetails(id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, attributes)
399
    self.send_updatePaymentDetails(id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes)
398
    return self.recv_updatePaymentDetails()
400
    return self.recv_updatePaymentDetails()
399
 
401
 
400
  def send_updatePaymentDetails(self, id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, attributes):
402
  def send_updatePaymentDetails(self, id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes):
401
    self._oprot.writeMessageBegin('updatePaymentDetails', TMessageType.CALL, self._seqid)
403
    self._oprot.writeMessageBegin('updatePaymentDetails', TMessageType.CALL, self._seqid)
402
    args = updatePaymentDetails_args()
404
    args = updatePaymentDetails_args()
403
    args.id = id
405
    args.id = id
404
    args.gatewayPaymentId = gatewayPaymentId
406
    args.gatewayPaymentId = gatewayPaymentId
405
    args.sessionId = sessionId
407
    args.sessionId = sessionId
Line 408... Line 410...
408
    args.gatewayTxnId = gatewayTxnId
410
    args.gatewayTxnId = gatewayTxnId
409
    args.authCode = authCode
411
    args.authCode = authCode
410
    args.referenceCode = referenceCode
412
    args.referenceCode = referenceCode
411
    args.errorCode = errorCode
413
    args.errorCode = errorCode
412
    args.status = status
414
    args.status = status
-
 
415
    args.gatewayTxnDate = gatewayTxnDate
413
    args.attributes = attributes
416
    args.attributes = attributes
414
    args.write(self._oprot)
417
    args.write(self._oprot)
415
    self._oprot.writeMessageEnd()
418
    self._oprot.writeMessageEnd()
416
    self._oprot.trans.flush()
419
    self._oprot.trans.flush()
417
 
420
 
Line 559... Line 562...
559
    args = updatePaymentDetails_args()
562
    args = updatePaymentDetails_args()
560
    args.read(iprot)
563
    args.read(iprot)
561
    iprot.readMessageEnd()
564
    iprot.readMessageEnd()
562
    result = updatePaymentDetails_result()
565
    result = updatePaymentDetails_result()
563
    try:
566
    try:
564
      result.success = self._handler.updatePaymentDetails(args.id, args.gatewayPaymentId, args.sessionId, args.gatewayTxnStatus, args.description, args.gatewayTxnId, args.authCode, args.referenceCode, args.errorCode, args.status, args.attributes)
567
      result.success = self._handler.updatePaymentDetails(args.id, args.gatewayPaymentId, args.sessionId, args.gatewayTxnStatus, args.description, args.gatewayTxnId, args.authCode, args.referenceCode, args.errorCode, args.status, args.gatewayTxnDate, args.attributes)
565
    except PaymentException, pe:
568
    except PaymentException, pe:
566
      result.pe = pe
569
      result.pe = pe
567
    oprot.writeMessageBegin("updatePaymentDetails", TMessageType.REPLY, seqid)
570
    oprot.writeMessageBegin("updatePaymentDetails", TMessageType.REPLY, seqid)
568
    result.write(oprot)
571
    result.write(oprot)
569
    oprot.writeMessageEnd()
572
    oprot.writeMessageEnd()
Line 1552... Line 1555...
1552
   - gatewayTxnId
1555
   - gatewayTxnId
1553
   - authCode
1556
   - authCode
1554
   - referenceCode
1557
   - referenceCode
1555
   - errorCode
1558
   - errorCode
1556
   - status
1559
   - status
-
 
1560
   - gatewayTxnDate
1557
   - attributes
1561
   - attributes
1558
  """
1562
  """
1559
 
1563
 
1560
  thrift_spec = (
1564
  thrift_spec = (
1561
    None, # 0
1565
    None, # 0
Line 1567... Line 1571...
1567
    (6, TType.STRING, 'gatewayTxnId', None, None, ), # 6
1571
    (6, TType.STRING, 'gatewayTxnId', None, None, ), # 6
1568
    (7, TType.STRING, 'authCode', None, None, ), # 7
1572
    (7, TType.STRING, 'authCode', None, None, ), # 7
1569
    (8, TType.STRING, 'referenceCode', None, None, ), # 8
1573
    (8, TType.STRING, 'referenceCode', None, None, ), # 8
1570
    (9, TType.STRING, 'errorCode', None, None, ), # 9
1574
    (9, TType.STRING, 'errorCode', None, None, ), # 9
1571
    (10, TType.I32, 'status', None, None, ), # 10
1575
    (10, TType.I32, 'status', None, None, ), # 10
-
 
1576
    (11, TType.STRING, 'gatewayTxnDate', None, None, ), # 11
1572
    (11, TType.LIST, 'attributes', (TType.STRUCT,(Attribute, Attribute.thrift_spec)), None, ), # 11
1577
    (12, TType.LIST, 'attributes', (TType.STRUCT,(Attribute, Attribute.thrift_spec)), None, ), # 12
1573
  )
1578
  )
1574
 
1579
 
1575
  def __init__(self, id=None, gatewayPaymentId=None, sessionId=None, gatewayTxnStatus=None, description=None, gatewayTxnId=None, authCode=None, referenceCode=None, errorCode=None, status=None, attributes=None,):
1580
  def __init__(self, id=None, gatewayPaymentId=None, sessionId=None, gatewayTxnStatus=None, description=None, gatewayTxnId=None, authCode=None, referenceCode=None, errorCode=None, status=None, gatewayTxnDate=None, attributes=None,):
1576
    self.id = id
1581
    self.id = id
1577
    self.gatewayPaymentId = gatewayPaymentId
1582
    self.gatewayPaymentId = gatewayPaymentId
1578
    self.sessionId = sessionId
1583
    self.sessionId = sessionId
1579
    self.gatewayTxnStatus = gatewayTxnStatus
1584
    self.gatewayTxnStatus = gatewayTxnStatus
1580
    self.description = description
1585
    self.description = description
1581
    self.gatewayTxnId = gatewayTxnId
1586
    self.gatewayTxnId = gatewayTxnId
1582
    self.authCode = authCode
1587
    self.authCode = authCode
1583
    self.referenceCode = referenceCode
1588
    self.referenceCode = referenceCode
1584
    self.errorCode = errorCode
1589
    self.errorCode = errorCode
1585
    self.status = status
1590
    self.status = status
-
 
1591
    self.gatewayTxnDate = gatewayTxnDate
1586
    self.attributes = attributes
1592
    self.attributes = attributes
1587
 
1593
 
1588
  def read(self, iprot):
1594
  def read(self, iprot):
1589
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1595
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1590
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1596
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
Line 1643... Line 1649...
1643
        if ftype == TType.I32:
1649
        if ftype == TType.I32:
1644
          self.status = iprot.readI32();
1650
          self.status = iprot.readI32();
1645
        else:
1651
        else:
1646
          iprot.skip(ftype)
1652
          iprot.skip(ftype)
1647
      elif fid == 11:
1653
      elif fid == 11:
-
 
1654
        if ftype == TType.STRING:
-
 
1655
          self.gatewayTxnDate = iprot.readString();
-
 
1656
        else:
-
 
1657
          iprot.skip(ftype)
-
 
1658
      elif fid == 12:
1648
        if ftype == TType.LIST:
1659
        if ftype == TType.LIST:
1649
          self.attributes = []
1660
          self.attributes = []
1650
          (_etype38, _size35) = iprot.readListBegin()
1661
          (_etype38, _size35) = iprot.readListBegin()
1651
          for _i39 in xrange(_size35):
1662
          for _i39 in xrange(_size35):
1652
            _elem40 = Attribute()
1663
            _elem40 = Attribute()
Line 1703... Line 1714...
1703
      oprot.writeFieldEnd()
1714
      oprot.writeFieldEnd()
1704
    if self.status != None:
1715
    if self.status != None:
1705
      oprot.writeFieldBegin('status', TType.I32, 10)
1716
      oprot.writeFieldBegin('status', TType.I32, 10)
1706
      oprot.writeI32(self.status)
1717
      oprot.writeI32(self.status)
1707
      oprot.writeFieldEnd()
1718
      oprot.writeFieldEnd()
-
 
1719
    if self.gatewayTxnDate != None:
-
 
1720
      oprot.writeFieldBegin('gatewayTxnDate', TType.STRING, 11)
-
 
1721
      oprot.writeString(self.gatewayTxnDate)
-
 
1722
      oprot.writeFieldEnd()
1708
    if self.attributes != None:
1723
    if self.attributes != None:
1709
      oprot.writeFieldBegin('attributes', TType.LIST, 11)
1724
      oprot.writeFieldBegin('attributes', TType.LIST, 12)
1710
      oprot.writeListBegin(TType.STRUCT, len(self.attributes))
1725
      oprot.writeListBegin(TType.STRUCT, len(self.attributes))
1711
      for iter41 in self.attributes:
1726
      for iter41 in self.attributes:
1712
        iter41.write(oprot)
1727
        iter41.write(oprot)
1713
      oprot.writeListEnd()
1728
      oprot.writeListEnd()
1714
      oprot.writeFieldEnd()
1729
      oprot.writeFieldEnd()