Subversion Repositories SmartDukaan

Rev

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

Rev 6503 Rev 7049
Line 100... Line 100...
100
    Parameters:
100
    Parameters:
101
     - txnId
101
     - txnId
102
    """
102
    """
103
    pass
103
    pass
104
 
104
 
-
 
105
  def getPaymentForRechargeTxnId(self, txnId):
-
 
106
    """
-
 
107
    Get payments for a recharge transaction id. Will raise exception.
-
 
108
 
-
 
109
 
-
 
110
    Parameters:
-
 
111
     - txnId
-
 
112
    """
-
 
113
    pass
-
 
114
 
105
  def getSuccessfulPaymentForTxnId(self, txnId):
115
  def getSuccessfulPaymentForTxnId(self, txnId):
106
    """
116
    """
107
    Get successful payment for a transaction. Will raise exception.
117
    Get successful payment for a transaction. Will raise exception.
108
 
118
 
109
 
119
 
Line 553... Line 563...
553
      return result.success
563
      return result.success
554
    if result.pe is not None:
564
    if result.pe is not None:
555
      raise result.pe
565
      raise result.pe
556
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentForTxnId failed: unknown result");
566
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentForTxnId failed: unknown result");
557
 
567
 
-
 
568
  def getPaymentForRechargeTxnId(self, txnId):
-
 
569
    """
-
 
570
    Get payments for a recharge transaction id. Will raise exception.
-
 
571
 
-
 
572
 
-
 
573
    Parameters:
-
 
574
     - txnId
-
 
575
    """
-
 
576
    self.send_getPaymentForRechargeTxnId(txnId)
-
 
577
    return self.recv_getPaymentForRechargeTxnId()
-
 
578
 
-
 
579
  def send_getPaymentForRechargeTxnId(self, txnId):
-
 
580
    self._oprot.writeMessageBegin('getPaymentForRechargeTxnId', TMessageType.CALL, self._seqid)
-
 
581
    args = getPaymentForRechargeTxnId_args()
-
 
582
    args.txnId = txnId
-
 
583
    args.write(self._oprot)
-
 
584
    self._oprot.writeMessageEnd()
-
 
585
    self._oprot.trans.flush()
-
 
586
 
-
 
587
  def recv_getPaymentForRechargeTxnId(self, ):
-
 
588
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
589
    if mtype == TMessageType.EXCEPTION:
-
 
590
      x = TApplicationException()
-
 
591
      x.read(self._iprot)
-
 
592
      self._iprot.readMessageEnd()
-
 
593
      raise x
-
 
594
    result = getPaymentForRechargeTxnId_result()
-
 
595
    result.read(self._iprot)
-
 
596
    self._iprot.readMessageEnd()
-
 
597
    if result.success is not None:
-
 
598
      return result.success
-
 
599
    if result.pe is not None:
-
 
600
      raise result.pe
-
 
601
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentForRechargeTxnId failed: unknown result");
-
 
602
 
558
  def getSuccessfulPaymentForTxnId(self, txnId):
603
  def getSuccessfulPaymentForTxnId(self, txnId):
559
    """
604
    """
560
    Get successful payment for a transaction. Will raise exception.
605
    Get successful payment for a transaction. Will raise exception.
561
 
606
 
562
 
607
 
Line 1029... Line 1074...
1029
    self._processMap["getPaymentsByCapturedDate"] = Processor.process_getPaymentsByCapturedDate
1074
    self._processMap["getPaymentsByCapturedDate"] = Processor.process_getPaymentsByCapturedDate
1030
    self._processMap["getPaymentGateway"] = Processor.process_getPaymentGateway
1075
    self._processMap["getPaymentGateway"] = Processor.process_getPaymentGateway
1031
    self._processMap["getActivePaymentGateways"] = Processor.process_getActivePaymentGateways
1076
    self._processMap["getActivePaymentGateways"] = Processor.process_getActivePaymentGateways
1032
    self._processMap["getPayment"] = Processor.process_getPayment
1077
    self._processMap["getPayment"] = Processor.process_getPayment
1033
    self._processMap["getPaymentForTxnId"] = Processor.process_getPaymentForTxnId
1078
    self._processMap["getPaymentForTxnId"] = Processor.process_getPaymentForTxnId
-
 
1079
    self._processMap["getPaymentForRechargeTxnId"] = Processor.process_getPaymentForRechargeTxnId
1034
    self._processMap["getSuccessfulPaymentForTxnId"] = Processor.process_getSuccessfulPaymentForTxnId
1080
    self._processMap["getSuccessfulPaymentForTxnId"] = Processor.process_getSuccessfulPaymentForTxnId
1035
    self._processMap["updatePaymentDetails"] = Processor.process_updatePaymentDetails
1081
    self._processMap["updatePaymentDetails"] = Processor.process_updatePaymentDetails
1036
    self._processMap["getSuccessfulPaymentsAmountRange"] = Processor.process_getSuccessfulPaymentsAmountRange
1082
    self._processMap["getSuccessfulPaymentsAmountRange"] = Processor.process_getSuccessfulPaymentsAmountRange
1037
    self._processMap["initializeHdfcPayment"] = Processor.process_initializeHdfcPayment
1083
    self._processMap["initializeHdfcPayment"] = Processor.process_initializeHdfcPayment
1038
    self._processMap["doHdfcPaymentForDigitalOrder"] = Processor.process_doHdfcPaymentForDigitalOrder
1084
    self._processMap["doHdfcPaymentForDigitalOrder"] = Processor.process_doHdfcPaymentForDigitalOrder
Line 1169... Line 1215...
1169
    oprot.writeMessageBegin("getPaymentForTxnId", TMessageType.REPLY, seqid)
1215
    oprot.writeMessageBegin("getPaymentForTxnId", TMessageType.REPLY, seqid)
1170
    result.write(oprot)
1216
    result.write(oprot)
1171
    oprot.writeMessageEnd()
1217
    oprot.writeMessageEnd()
1172
    oprot.trans.flush()
1218
    oprot.trans.flush()
1173
 
1219
 
-
 
1220
  def process_getPaymentForRechargeTxnId(self, seqid, iprot, oprot):
-
 
1221
    args = getPaymentForRechargeTxnId_args()
-
 
1222
    args.read(iprot)
-
 
1223
    iprot.readMessageEnd()
-
 
1224
    result = getPaymentForRechargeTxnId_result()
-
 
1225
    try:
-
 
1226
      result.success = self._handler.getPaymentForRechargeTxnId(args.txnId)
-
 
1227
    except PaymentException, pe:
-
 
1228
      result.pe = pe
-
 
1229
    oprot.writeMessageBegin("getPaymentForRechargeTxnId", TMessageType.REPLY, seqid)
-
 
1230
    result.write(oprot)
-
 
1231
    oprot.writeMessageEnd()
-
 
1232
    oprot.trans.flush()
-
 
1233
 
1174
  def process_getSuccessfulPaymentForTxnId(self, seqid, iprot, oprot):
1234
  def process_getSuccessfulPaymentForTxnId(self, seqid, iprot, oprot):
1175
    args = getSuccessfulPaymentForTxnId_args()
1235
    args = getSuccessfulPaymentForTxnId_args()
1176
    args.read(iprot)
1236
    args.read(iprot)
1177
    iprot.readMessageEnd()
1237
    iprot.readMessageEnd()
1178
    result = getSuccessfulPaymentForTxnId_result()
1238
    result = getSuccessfulPaymentForTxnId_result()
Line 2572... Line 2632...
2572
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2632
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2573
 
2633
 
2574
  def __ne__(self, other):
2634
  def __ne__(self, other):
2575
    return not (self == other)
2635
    return not (self == other)
2576
 
2636
 
-
 
2637
class getPaymentForRechargeTxnId_args:
-
 
2638
  """
-
 
2639
  Attributes:
-
 
2640
   - txnId
-
 
2641
  """
-
 
2642
 
-
 
2643
  thrift_spec = (
-
 
2644
    None, # 0
-
 
2645
    (1, TType.I64, 'txnId', None, None, ), # 1
-
 
2646
  )
-
 
2647
 
-
 
2648
  def __init__(self, txnId=None,):
-
 
2649
    self.txnId = txnId
-
 
2650
 
-
 
2651
  def read(self, iprot):
-
 
2652
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2653
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2654
      return
-
 
2655
    iprot.readStructBegin()
-
 
2656
    while True:
-
 
2657
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2658
      if ftype == TType.STOP:
-
 
2659
        break
-
 
2660
      if fid == 1:
-
 
2661
        if ftype == TType.I64:
-
 
2662
          self.txnId = iprot.readI64();
-
 
2663
        else:
-
 
2664
          iprot.skip(ftype)
-
 
2665
      else:
-
 
2666
        iprot.skip(ftype)
-
 
2667
      iprot.readFieldEnd()
-
 
2668
    iprot.readStructEnd()
-
 
2669
 
-
 
2670
  def write(self, oprot):
-
 
2671
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2672
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2673
      return
-
 
2674
    oprot.writeStructBegin('getPaymentForRechargeTxnId_args')
-
 
2675
    if self.txnId is not None:
-
 
2676
      oprot.writeFieldBegin('txnId', TType.I64, 1)
-
 
2677
      oprot.writeI64(self.txnId)
-
 
2678
      oprot.writeFieldEnd()
-
 
2679
    oprot.writeFieldStop()
-
 
2680
    oprot.writeStructEnd()
-
 
2681
 
-
 
2682
  def validate(self):
-
 
2683
    return
-
 
2684
 
-
 
2685
 
-
 
2686
  def __repr__(self):
-
 
2687
    L = ['%s=%r' % (key, value)
-
 
2688
      for key, value in self.__dict__.iteritems()]
-
 
2689
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2690
 
-
 
2691
  def __eq__(self, other):
-
 
2692
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2693
 
-
 
2694
  def __ne__(self, other):
-
 
2695
    return not (self == other)
-
 
2696
 
-
 
2697
class getPaymentForRechargeTxnId_result:
-
 
2698
  """
-
 
2699
  Attributes:
-
 
2700
   - success
-
 
2701
   - pe
-
 
2702
  """
-
 
2703
 
-
 
2704
  thrift_spec = (
-
 
2705
    (0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0
-
 
2706
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
-
 
2707
  )
-
 
2708
 
-
 
2709
  def __init__(self, success=None, pe=None,):
-
 
2710
    self.success = success
-
 
2711
    self.pe = pe
-
 
2712
 
-
 
2713
  def read(self, iprot):
-
 
2714
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2715
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2716
      return
-
 
2717
    iprot.readStructBegin()
-
 
2718
    while True:
-
 
2719
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2720
      if ftype == TType.STOP:
-
 
2721
        break
-
 
2722
      if fid == 0:
-
 
2723
        if ftype == TType.LIST:
-
 
2724
          self.success = []
-
 
2725
          (_etype59, _size56) = iprot.readListBegin()
-
 
2726
          for _i60 in xrange(_size56):
-
 
2727
            _elem61 = Payment()
-
 
2728
            _elem61.read(iprot)
-
 
2729
            self.success.append(_elem61)
-
 
2730
          iprot.readListEnd()
-
 
2731
        else:
-
 
2732
          iprot.skip(ftype)
-
 
2733
      elif fid == 1:
-
 
2734
        if ftype == TType.STRUCT:
-
 
2735
          self.pe = PaymentException()
-
 
2736
          self.pe.read(iprot)
-
 
2737
        else:
-
 
2738
          iprot.skip(ftype)
-
 
2739
      else:
-
 
2740
        iprot.skip(ftype)
-
 
2741
      iprot.readFieldEnd()
-
 
2742
    iprot.readStructEnd()
-
 
2743
 
-
 
2744
  def write(self, oprot):
-
 
2745
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2746
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2747
      return
-
 
2748
    oprot.writeStructBegin('getPaymentForRechargeTxnId_result')
-
 
2749
    if self.success is not None:
-
 
2750
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
2751
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
2752
      for iter62 in self.success:
-
 
2753
        iter62.write(oprot)
-
 
2754
      oprot.writeListEnd()
-
 
2755
      oprot.writeFieldEnd()
-
 
2756
    if self.pe is not None:
-
 
2757
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
-
 
2758
      self.pe.write(oprot)
-
 
2759
      oprot.writeFieldEnd()
-
 
2760
    oprot.writeFieldStop()
-
 
2761
    oprot.writeStructEnd()
-
 
2762
 
-
 
2763
  def validate(self):
-
 
2764
    return
-
 
2765
 
-
 
2766
 
-
 
2767
  def __repr__(self):
-
 
2768
    L = ['%s=%r' % (key, value)
-
 
2769
      for key, value in self.__dict__.iteritems()]
-
 
2770
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2771
 
-
 
2772
  def __eq__(self, other):
-
 
2773
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2774
 
-
 
2775
  def __ne__(self, other):
-
 
2776
    return not (self == other)
-
 
2777
 
2577
class getSuccessfulPaymentForTxnId_args:
2778
class getSuccessfulPaymentForTxnId_args:
2578
  """
2779
  """
2579
  Attributes:
2780
  Attributes:
2580
   - txnId
2781
   - txnId
2581
  """
2782
  """
Line 2819... Line 3020...
2819
        else:
3020
        else:
2820
          iprot.skip(ftype)
3021
          iprot.skip(ftype)
2821
      elif fid == 12:
3022
      elif fid == 12:
2822
        if ftype == TType.LIST:
3023
        if ftype == TType.LIST:
2823
          self.attributes = []
3024
          self.attributes = []
2824
          (_etype59, _size56) = iprot.readListBegin()
3025
          (_etype66, _size63) = iprot.readListBegin()
2825
          for _i60 in xrange(_size56):
3026
          for _i67 in xrange(_size63):
2826
            _elem61 = Attribute()
3027
            _elem68 = Attribute()
2827
            _elem61.read(iprot)
3028
            _elem68.read(iprot)
2828
            self.attributes.append(_elem61)
3029
            self.attributes.append(_elem68)
2829
          iprot.readListEnd()
3030
          iprot.readListEnd()
2830
        else:
3031
        else:
2831
          iprot.skip(ftype)
3032
          iprot.skip(ftype)
2832
      else:
3033
      else:
2833
        iprot.skip(ftype)
3034
        iprot.skip(ftype)
Line 2884... Line 3085...
2884
      oprot.writeString(self.gatewayTxnDate)
3085
      oprot.writeString(self.gatewayTxnDate)
2885
      oprot.writeFieldEnd()
3086
      oprot.writeFieldEnd()
2886
    if self.attributes is not None:
3087
    if self.attributes is not None:
2887
      oprot.writeFieldBegin('attributes', TType.LIST, 12)
3088
      oprot.writeFieldBegin('attributes', TType.LIST, 12)
2888
      oprot.writeListBegin(TType.STRUCT, len(self.attributes))
3089
      oprot.writeListBegin(TType.STRUCT, len(self.attributes))
2889
      for iter62 in self.attributes:
3090
      for iter69 in self.attributes:
2890
        iter62.write(oprot)
3091
        iter69.write(oprot)
2891
      oprot.writeListEnd()
3092
      oprot.writeListEnd()
2892
      oprot.writeFieldEnd()
3093
      oprot.writeFieldEnd()
2893
    oprot.writeFieldStop()
3094
    oprot.writeFieldStop()
2894
    oprot.writeStructEnd()
3095
    oprot.writeStructEnd()
2895
 
3096
 
Line 3045... Line 3246...
3045
      if ftype == TType.STOP:
3246
      if ftype == TType.STOP:
3046
        break
3247
        break
3047
      if fid == 0:
3248
      if fid == 0:
3048
        if ftype == TType.LIST:
3249
        if ftype == TType.LIST:
3049
          self.success = []
3250
          self.success = []
3050
          (_etype66, _size63) = iprot.readListBegin()
3251
          (_etype73, _size70) = iprot.readListBegin()
3051
          for _i67 in xrange(_size63):
3252
          for _i74 in xrange(_size70):
3052
            _elem68 = iprot.readDouble();
3253
            _elem75 = iprot.readDouble();
3053
            self.success.append(_elem68)
3254
            self.success.append(_elem75)
3054
          iprot.readListEnd()
3255
          iprot.readListEnd()
3055
        else:
3256
        else:
3056
          iprot.skip(ftype)
3257
          iprot.skip(ftype)
3057
      else:
3258
      else:
3058
        iprot.skip(ftype)
3259
        iprot.skip(ftype)
Line 3065... Line 3266...
3065
      return
3266
      return
3066
    oprot.writeStructBegin('getSuccessfulPaymentsAmountRange_result')
3267
    oprot.writeStructBegin('getSuccessfulPaymentsAmountRange_result')
3067
    if self.success is not None:
3268
    if self.success is not None:
3068
      oprot.writeFieldBegin('success', TType.LIST, 0)
3269
      oprot.writeFieldBegin('success', TType.LIST, 0)
3069
      oprot.writeListBegin(TType.DOUBLE, len(self.success))
3270
      oprot.writeListBegin(TType.DOUBLE, len(self.success))
3070
      for iter69 in self.success:
3271
      for iter76 in self.success:
3071
        oprot.writeDouble(iter69)
3272
        oprot.writeDouble(iter76)
3072
      oprot.writeListEnd()
3273
      oprot.writeListEnd()
3073
      oprot.writeFieldEnd()
3274
      oprot.writeFieldEnd()
3074
    oprot.writeFieldStop()
3275
    oprot.writeFieldStop()
3075
    oprot.writeStructEnd()
3276
    oprot.writeStructEnd()
3076
 
3277
 
Line 4210... Line 4411...
4210
      if ftype == TType.STOP:
4411
      if ftype == TType.STOP:
4211
        break
4412
        break
4212
      if fid == 0:
4413
      if fid == 0:
4213
        if ftype == TType.LIST:
4414
        if ftype == TType.LIST:
4214
          self.success = []
4415
          self.success = []
4215
          (_etype73, _size70) = iprot.readListBegin()
4416
          (_etype80, _size77) = iprot.readListBegin()
4216
          for _i74 in xrange(_size70):
4417
          for _i81 in xrange(_size77):
4217
            _elem75 = iprot.readI64();
4418
            _elem82 = iprot.readI64();
4218
            self.success.append(_elem75)
4419
            self.success.append(_elem82)
4219
          iprot.readListEnd()
4420
          iprot.readListEnd()
4220
        else:
4421
        else:
4221
          iprot.skip(ftype)
4422
          iprot.skip(ftype)
4222
      else:
4423
      else:
4223
        iprot.skip(ftype)
4424
        iprot.skip(ftype)
Line 4230... Line 4431...
4230
      return
4431
      return
4231
    oprot.writeStructBegin('getPaymentsRequiringExtraProcessing_result')
4432
    oprot.writeStructBegin('getPaymentsRequiringExtraProcessing_result')
4232
    if self.success is not None:
4433
    if self.success is not None:
4233
      oprot.writeFieldBegin('success', TType.LIST, 0)
4434
      oprot.writeFieldBegin('success', TType.LIST, 0)
4234
      oprot.writeListBegin(TType.I64, len(self.success))
4435
      oprot.writeListBegin(TType.I64, len(self.success))
4235
      for iter76 in self.success:
4436
      for iter83 in self.success:
4236
        oprot.writeI64(iter76)
4437
        oprot.writeI64(iter83)
4237
      oprot.writeListEnd()
4438
      oprot.writeListEnd()
4238
      oprot.writeFieldEnd()
4439
      oprot.writeFieldEnd()
4239
    oprot.writeFieldStop()
4440
    oprot.writeFieldStop()
4240
    oprot.writeStructEnd()
4441
    oprot.writeStructEnd()
4241
 
4442