Subversion Repositories SmartDukaan

Rev

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

Rev 2062 Rev 2559
Line 118... Line 118...
118
    Returns the minimum and maximum amounts among successful payments.
118
    Returns the minimum and maximum amounts among successful payments.
119
    List contains two double values, first minimum and second maximum amount.
119
    List contains two double values, first minimum and second maximum amount.
120
    """
120
    """
121
    pass
121
    pass
122
 
122
 
-
 
123
  def updateAndCaptureEbsPayment(self, paymentParams):
-
 
124
    """
-
 
125
    Update the authorization attributes of the payment and attempt to capture it in case it was authorized.
-
 
126
    If either the authorization failed or the capture attempt failed, the payment is marked as failed.
-
 
127
    
-
 
128
    Parameters:
-
 
129
     - paymentParams
-
 
130
    """
-
 
131
    pass
-
 
132
 
-
 
133
  def captureHdfcPayment(self, merchantPaymentId):
-
 
134
    """
-
 
135
    Captures an already authorized Hdfc Payment and returns a map containing the details of the capture transaction
-
 
136
    
-
 
137
    Parameters:
-
 
138
     - merchantPaymentId
-
 
139
    """
-
 
140
    pass
-
 
141
 
-
 
142
  def initializeHdfcPayment(self, merchantPaymentId):
-
 
143
    """
-
 
144
    Initialize the payment pipe for a HDFC payment. The URL the user should be redirected to is returned.
-
 
145
    In case of any processing error, an exception is raised.
-
 
146
    
-
 
147
    Parameters:
-
 
148
     - merchantPaymentId
-
 
149
    """
-
 
150
    pass
-
 
151
 
123
 
152
 
124
class Client(Iface):
153
class Client(Iface):
125
  def __init__(self, iprot, oprot=None):
154
  def __init__(self, iprot, oprot=None):
126
    self._iprot = self._oprot = iprot
155
    self._iprot = self._oprot = iprot
127
    if oprot != None:
156
    if oprot != None:
Line 468... Line 497...
468
    self._iprot.readMessageEnd()
497
    self._iprot.readMessageEnd()
469
    if result.success != None:
498
    if result.success != None:
470
      return result.success
499
      return result.success
471
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSuccessfulPaymentsAmountRange failed: unknown result");
500
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSuccessfulPaymentsAmountRange failed: unknown result");
472
 
501
 
-
 
502
  def updateAndCaptureEbsPayment(self, paymentParams):
-
 
503
    """
-
 
504
    Update the authorization attributes of the payment and attempt to capture it in case it was authorized.
-
 
505
    If either the authorization failed or the capture attempt failed, the payment is marked as failed.
-
 
506
    
-
 
507
    Parameters:
-
 
508
     - paymentParams
-
 
509
    """
-
 
510
    self.send_updateAndCaptureEbsPayment(paymentParams)
-
 
511
    return self.recv_updateAndCaptureEbsPayment()
-
 
512
 
-
 
513
  def send_updateAndCaptureEbsPayment(self, paymentParams):
-
 
514
    self._oprot.writeMessageBegin('updateAndCaptureEbsPayment', TMessageType.CALL, self._seqid)
-
 
515
    args = updateAndCaptureEbsPayment_args()
-
 
516
    args.paymentParams = paymentParams
-
 
517
    args.write(self._oprot)
-
 
518
    self._oprot.writeMessageEnd()
-
 
519
    self._oprot.trans.flush()
-
 
520
 
-
 
521
  def recv_updateAndCaptureEbsPayment(self, ):
-
 
522
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
523
    if mtype == TMessageType.EXCEPTION:
-
 
524
      x = TApplicationException()
-
 
525
      x.read(self._iprot)
-
 
526
      self._iprot.readMessageEnd()
-
 
527
      raise x
-
 
528
    result = updateAndCaptureEbsPayment_result()
-
 
529
    result.read(self._iprot)
-
 
530
    self._iprot.readMessageEnd()
-
 
531
    if result.success != None:
-
 
532
      return result.success
-
 
533
    if result.pe != None:
-
 
534
      raise result.pe
-
 
535
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateAndCaptureEbsPayment failed: unknown result");
-
 
536
 
-
 
537
  def captureHdfcPayment(self, merchantPaymentId):
-
 
538
    """
-
 
539
    Captures an already authorized Hdfc Payment and returns a map containing the details of the capture transaction
-
 
540
    
-
 
541
    Parameters:
-
 
542
     - merchantPaymentId
-
 
543
    """
-
 
544
    self.send_captureHdfcPayment(merchantPaymentId)
-
 
545
    return self.recv_captureHdfcPayment()
-
 
546
 
-
 
547
  def send_captureHdfcPayment(self, merchantPaymentId):
-
 
548
    self._oprot.writeMessageBegin('captureHdfcPayment', TMessageType.CALL, self._seqid)
-
 
549
    args = captureHdfcPayment_args()
-
 
550
    args.merchantPaymentId = merchantPaymentId
-
 
551
    args.write(self._oprot)
-
 
552
    self._oprot.writeMessageEnd()
-
 
553
    self._oprot.trans.flush()
-
 
554
 
-
 
555
  def recv_captureHdfcPayment(self, ):
-
 
556
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
557
    if mtype == TMessageType.EXCEPTION:
-
 
558
      x = TApplicationException()
-
 
559
      x.read(self._iprot)
-
 
560
      self._iprot.readMessageEnd()
-
 
561
      raise x
-
 
562
    result = captureHdfcPayment_result()
-
 
563
    result.read(self._iprot)
-
 
564
    self._iprot.readMessageEnd()
-
 
565
    if result.success != None:
-
 
566
      return result.success
-
 
567
    if result.pe != None:
-
 
568
      raise result.pe
-
 
569
    raise TApplicationException(TApplicationException.MISSING_RESULT, "captureHdfcPayment failed: unknown result");
-
 
570
 
-
 
571
  def initializeHdfcPayment(self, merchantPaymentId):
-
 
572
    """
-
 
573
    Initialize the payment pipe for a HDFC payment. The URL the user should be redirected to is returned.
-
 
574
    In case of any processing error, an exception is raised.
-
 
575
    
-
 
576
    Parameters:
-
 
577
     - merchantPaymentId
-
 
578
    """
-
 
579
    self.send_initializeHdfcPayment(merchantPaymentId)
-
 
580
    return self.recv_initializeHdfcPayment()
-
 
581
 
-
 
582
  def send_initializeHdfcPayment(self, merchantPaymentId):
-
 
583
    self._oprot.writeMessageBegin('initializeHdfcPayment', TMessageType.CALL, self._seqid)
-
 
584
    args = initializeHdfcPayment_args()
-
 
585
    args.merchantPaymentId = merchantPaymentId
-
 
586
    args.write(self._oprot)
-
 
587
    self._oprot.writeMessageEnd()
-
 
588
    self._oprot.trans.flush()
-
 
589
 
-
 
590
  def recv_initializeHdfcPayment(self, ):
-
 
591
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
592
    if mtype == TMessageType.EXCEPTION:
-
 
593
      x = TApplicationException()
-
 
594
      x.read(self._iprot)
-
 
595
      self._iprot.readMessageEnd()
-
 
596
      raise x
-
 
597
    result = initializeHdfcPayment_result()
-
 
598
    result.read(self._iprot)
-
 
599
    self._iprot.readMessageEnd()
-
 
600
    if result.success != None:
-
 
601
      return result.success
-
 
602
    if result.pe != None:
-
 
603
      raise result.pe
-
 
604
    raise TApplicationException(TApplicationException.MISSING_RESULT, "initializeHdfcPayment failed: unknown result");
-
 
605
 
473
 
606
 
474
class Processor(Iface, TProcessor):
607
class Processor(Iface, TProcessor):
475
  def __init__(self, handler):
608
  def __init__(self, handler):
476
    self._handler = handler
609
    self._handler = handler
477
    self._processMap = {}
610
    self._processMap = {}
Line 482... Line 615...
482
    self._processMap["getPaymentGateway"] = Processor.process_getPaymentGateway
615
    self._processMap["getPaymentGateway"] = Processor.process_getPaymentGateway
483
    self._processMap["getPayment"] = Processor.process_getPayment
616
    self._processMap["getPayment"] = Processor.process_getPayment
484
    self._processMap["getPaymentForTxnId"] = Processor.process_getPaymentForTxnId
617
    self._processMap["getPaymentForTxnId"] = Processor.process_getPaymentForTxnId
485
    self._processMap["updatePaymentDetails"] = Processor.process_updatePaymentDetails
618
    self._processMap["updatePaymentDetails"] = Processor.process_updatePaymentDetails
486
    self._processMap["getSuccessfulPaymentsAmountRange"] = Processor.process_getSuccessfulPaymentsAmountRange
619
    self._processMap["getSuccessfulPaymentsAmountRange"] = Processor.process_getSuccessfulPaymentsAmountRange
-
 
620
    self._processMap["updateAndCaptureEbsPayment"] = Processor.process_updateAndCaptureEbsPayment
-
 
621
    self._processMap["captureHdfcPayment"] = Processor.process_captureHdfcPayment
-
 
622
    self._processMap["initializeHdfcPayment"] = Processor.process_initializeHdfcPayment
487
 
623
 
488
  def process(self, iprot, oprot):
624
  def process(self, iprot, oprot):
489
    (name, type, seqid) = iprot.readMessageBegin()
625
    (name, type, seqid) = iprot.readMessageBegin()
490
    if name not in self._processMap:
626
    if name not in self._processMap:
491
      iprot.skip(TType.STRUCT)
627
      iprot.skip(TType.STRUCT)
Line 618... Line 754...
618
    oprot.writeMessageBegin("getSuccessfulPaymentsAmountRange", TMessageType.REPLY, seqid)
754
    oprot.writeMessageBegin("getSuccessfulPaymentsAmountRange", TMessageType.REPLY, seqid)
619
    result.write(oprot)
755
    result.write(oprot)
620
    oprot.writeMessageEnd()
756
    oprot.writeMessageEnd()
621
    oprot.trans.flush()
757
    oprot.trans.flush()
622
 
758
 
-
 
759
  def process_updateAndCaptureEbsPayment(self, seqid, iprot, oprot):
-
 
760
    args = updateAndCaptureEbsPayment_args()
-
 
761
    args.read(iprot)
-
 
762
    iprot.readMessageEnd()
-
 
763
    result = updateAndCaptureEbsPayment_result()
-
 
764
    try:
-
 
765
      result.success = self._handler.updateAndCaptureEbsPayment(args.paymentParams)
-
 
766
    except PaymentException, pe:
-
 
767
      result.pe = pe
-
 
768
    oprot.writeMessageBegin("updateAndCaptureEbsPayment", TMessageType.REPLY, seqid)
-
 
769
    result.write(oprot)
-
 
770
    oprot.writeMessageEnd()
-
 
771
    oprot.trans.flush()
-
 
772
 
-
 
773
  def process_captureHdfcPayment(self, seqid, iprot, oprot):
-
 
774
    args = captureHdfcPayment_args()
-
 
775
    args.read(iprot)
-
 
776
    iprot.readMessageEnd()
-
 
777
    result = captureHdfcPayment_result()
-
 
778
    try:
-
 
779
      result.success = self._handler.captureHdfcPayment(args.merchantPaymentId)
-
 
780
    except PaymentException, pe:
-
 
781
      result.pe = pe
-
 
782
    oprot.writeMessageBegin("captureHdfcPayment", TMessageType.REPLY, seqid)
-
 
783
    result.write(oprot)
-
 
784
    oprot.writeMessageEnd()
-
 
785
    oprot.trans.flush()
-
 
786
 
-
 
787
  def process_initializeHdfcPayment(self, seqid, iprot, oprot):
-
 
788
    args = initializeHdfcPayment_args()
-
 
789
    args.read(iprot)
-
 
790
    iprot.readMessageEnd()
-
 
791
    result = initializeHdfcPayment_result()
-
 
792
    try:
-
 
793
      result.success = self._handler.initializeHdfcPayment(args.merchantPaymentId)
-
 
794
    except PaymentException, pe:
-
 
795
      result.pe = pe
-
 
796
    oprot.writeMessageBegin("initializeHdfcPayment", TMessageType.REPLY, seqid)
-
 
797
    result.write(oprot)
-
 
798
    oprot.writeMessageEnd()
-
 
799
    oprot.trans.flush()
-
 
800
 
623
 
801
 
624
# HELPER FUNCTIONS AND STRUCTURES
802
# HELPER FUNCTIONS AND STRUCTURES
625
 
803
 
626
class closeSession_args:
804
class closeSession_args:
627
 
805
 
Line 1946... Line 2124...
1946
      oprot.writeFieldEnd()
2124
      oprot.writeFieldEnd()
1947
    oprot.writeFieldStop()
2125
    oprot.writeFieldStop()
1948
    oprot.writeStructEnd()
2126
    oprot.writeStructEnd()
1949
 
2127
 
1950
  def __repr__(self):
2128
  def __repr__(self):
-
 
2129
    L = ['%s=%r' % (key, value)
-
 
2130
      for key, value in self.__dict__.iteritems()]
-
 
2131
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2132
 
-
 
2133
  def __eq__(self, other):
-
 
2134
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2135
 
-
 
2136
  def __ne__(self, other):
-
 
2137
    return not (self == other)
-
 
2138
 
-
 
2139
class updateAndCaptureEbsPayment_args:
-
 
2140
  """
-
 
2141
  Attributes:
-
 
2142
   - paymentParams
-
 
2143
  """
-
 
2144
 
-
 
2145
  thrift_spec = (
-
 
2146
    None, # 0
-
 
2147
    (1, TType.MAP, 'paymentParams', (TType.STRING,None,TType.STRING,None), None, ), # 1
-
 
2148
  )
-
 
2149
 
-
 
2150
  def __init__(self, paymentParams=None,):
-
 
2151
    self.paymentParams = paymentParams
-
 
2152
 
-
 
2153
  def read(self, iprot):
-
 
2154
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2155
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2156
      return
-
 
2157
    iprot.readStructBegin()
-
 
2158
    while True:
-
 
2159
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2160
      if ftype == TType.STOP:
-
 
2161
        break
-
 
2162
      if fid == 1:
-
 
2163
        if ftype == TType.MAP:
-
 
2164
          self.paymentParams = {}
-
 
2165
          (_ktype50, _vtype51, _size49 ) = iprot.readMapBegin() 
-
 
2166
          for _i53 in xrange(_size49):
-
 
2167
            _key54 = iprot.readString();
-
 
2168
            _val55 = iprot.readString();
-
 
2169
            self.paymentParams[_key54] = _val55
-
 
2170
          iprot.readMapEnd()
-
 
2171
        else:
-
 
2172
          iprot.skip(ftype)
-
 
2173
      else:
-
 
2174
        iprot.skip(ftype)
-
 
2175
      iprot.readFieldEnd()
-
 
2176
    iprot.readStructEnd()
-
 
2177
 
-
 
2178
  def write(self, oprot):
-
 
2179
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2180
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2181
      return
-
 
2182
    oprot.writeStructBegin('updateAndCaptureEbsPayment_args')
-
 
2183
    if self.paymentParams != None:
-
 
2184
      oprot.writeFieldBegin('paymentParams', TType.MAP, 1)
-
 
2185
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.paymentParams))
-
 
2186
      for kiter56,viter57 in self.paymentParams.items():
-
 
2187
        oprot.writeString(kiter56)
-
 
2188
        oprot.writeString(viter57)
-
 
2189
      oprot.writeMapEnd()
-
 
2190
      oprot.writeFieldEnd()
-
 
2191
    oprot.writeFieldStop()
-
 
2192
    oprot.writeStructEnd()
-
 
2193
 
-
 
2194
  def __repr__(self):
-
 
2195
    L = ['%s=%r' % (key, value)
-
 
2196
      for key, value in self.__dict__.iteritems()]
-
 
2197
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2198
 
-
 
2199
  def __eq__(self, other):
-
 
2200
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2201
 
-
 
2202
  def __ne__(self, other):
-
 
2203
    return not (self == other)
-
 
2204
 
-
 
2205
class updateAndCaptureEbsPayment_result:
-
 
2206
  """
-
 
2207
  Attributes:
-
 
2208
   - success
-
 
2209
   - pe
-
 
2210
  """
-
 
2211
 
-
 
2212
  thrift_spec = (
-
 
2213
    (0, TType.STRUCT, 'success', (Payment, Payment.thrift_spec), None, ), # 0
-
 
2214
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
-
 
2215
  )
-
 
2216
 
-
 
2217
  def __init__(self, success=None, pe=None,):
-
 
2218
    self.success = success
-
 
2219
    self.pe = pe
-
 
2220
 
-
 
2221
  def read(self, iprot):
-
 
2222
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2223
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2224
      return
-
 
2225
    iprot.readStructBegin()
-
 
2226
    while True:
-
 
2227
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2228
      if ftype == TType.STOP:
-
 
2229
        break
-
 
2230
      if fid == 0:
-
 
2231
        if ftype == TType.STRUCT:
-
 
2232
          self.success = Payment()
-
 
2233
          self.success.read(iprot)
-
 
2234
        else:
-
 
2235
          iprot.skip(ftype)
-
 
2236
      elif fid == 1:
-
 
2237
        if ftype == TType.STRUCT:
-
 
2238
          self.pe = PaymentException()
-
 
2239
          self.pe.read(iprot)
-
 
2240
        else:
-
 
2241
          iprot.skip(ftype)
-
 
2242
      else:
-
 
2243
        iprot.skip(ftype)
-
 
2244
      iprot.readFieldEnd()
-
 
2245
    iprot.readStructEnd()
-
 
2246
 
-
 
2247
  def write(self, oprot):
-
 
2248
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2249
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2250
      return
-
 
2251
    oprot.writeStructBegin('updateAndCaptureEbsPayment_result')
-
 
2252
    if self.success != None:
-
 
2253
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
2254
      self.success.write(oprot)
-
 
2255
      oprot.writeFieldEnd()
-
 
2256
    if self.pe != None:
-
 
2257
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
-
 
2258
      self.pe.write(oprot)
-
 
2259
      oprot.writeFieldEnd()
-
 
2260
    oprot.writeFieldStop()
-
 
2261
    oprot.writeStructEnd()
-
 
2262
 
-
 
2263
  def __repr__(self):
-
 
2264
    L = ['%s=%r' % (key, value)
-
 
2265
      for key, value in self.__dict__.iteritems()]
-
 
2266
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2267
 
-
 
2268
  def __eq__(self, other):
-
 
2269
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2270
 
-
 
2271
  def __ne__(self, other):
-
 
2272
    return not (self == other)
-
 
2273
 
-
 
2274
class captureHdfcPayment_args:
-
 
2275
  """
-
 
2276
  Attributes:
-
 
2277
   - merchantPaymentId
-
 
2278
  """
-
 
2279
 
-
 
2280
  thrift_spec = (
-
 
2281
    None, # 0
-
 
2282
    (1, TType.I64, 'merchantPaymentId', None, None, ), # 1
-
 
2283
  )
-
 
2284
 
-
 
2285
  def __init__(self, merchantPaymentId=None,):
-
 
2286
    self.merchantPaymentId = merchantPaymentId
-
 
2287
 
-
 
2288
  def read(self, iprot):
-
 
2289
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2290
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2291
      return
-
 
2292
    iprot.readStructBegin()
-
 
2293
    while True:
-
 
2294
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2295
      if ftype == TType.STOP:
-
 
2296
        break
-
 
2297
      if fid == 1:
-
 
2298
        if ftype == TType.I64:
-
 
2299
          self.merchantPaymentId = iprot.readI64();
-
 
2300
        else:
-
 
2301
          iprot.skip(ftype)
-
 
2302
      else:
-
 
2303
        iprot.skip(ftype)
-
 
2304
      iprot.readFieldEnd()
-
 
2305
    iprot.readStructEnd()
-
 
2306
 
-
 
2307
  def write(self, oprot):
-
 
2308
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2309
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2310
      return
-
 
2311
    oprot.writeStructBegin('captureHdfcPayment_args')
-
 
2312
    if self.merchantPaymentId != None:
-
 
2313
      oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)
-
 
2314
      oprot.writeI64(self.merchantPaymentId)
-
 
2315
      oprot.writeFieldEnd()
-
 
2316
    oprot.writeFieldStop()
-
 
2317
    oprot.writeStructEnd()
-
 
2318
 
-
 
2319
  def __repr__(self):
-
 
2320
    L = ['%s=%r' % (key, value)
-
 
2321
      for key, value in self.__dict__.iteritems()]
-
 
2322
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2323
 
-
 
2324
  def __eq__(self, other):
-
 
2325
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2326
 
-
 
2327
  def __ne__(self, other):
-
 
2328
    return not (self == other)
-
 
2329
 
-
 
2330
class captureHdfcPayment_result:
-
 
2331
  """
-
 
2332
  Attributes:
-
 
2333
   - success
-
 
2334
   - pe
-
 
2335
  """
-
 
2336
 
-
 
2337
  thrift_spec = (
-
 
2338
    (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0
-
 
2339
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
-
 
2340
  )
-
 
2341
 
-
 
2342
  def __init__(self, success=None, pe=None,):
-
 
2343
    self.success = success
-
 
2344
    self.pe = pe
-
 
2345
 
-
 
2346
  def read(self, iprot):
-
 
2347
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2348
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2349
      return
-
 
2350
    iprot.readStructBegin()
-
 
2351
    while True:
-
 
2352
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2353
      if ftype == TType.STOP:
-
 
2354
        break
-
 
2355
      if fid == 0:
-
 
2356
        if ftype == TType.MAP:
-
 
2357
          self.success = {}
-
 
2358
          (_ktype59, _vtype60, _size58 ) = iprot.readMapBegin() 
-
 
2359
          for _i62 in xrange(_size58):
-
 
2360
            _key63 = iprot.readString();
-
 
2361
            _val64 = iprot.readString();
-
 
2362
            self.success[_key63] = _val64
-
 
2363
          iprot.readMapEnd()
-
 
2364
        else:
-
 
2365
          iprot.skip(ftype)
-
 
2366
      elif fid == 1:
-
 
2367
        if ftype == TType.STRUCT:
-
 
2368
          self.pe = PaymentException()
-
 
2369
          self.pe.read(iprot)
-
 
2370
        else:
-
 
2371
          iprot.skip(ftype)
-
 
2372
      else:
-
 
2373
        iprot.skip(ftype)
-
 
2374
      iprot.readFieldEnd()
-
 
2375
    iprot.readStructEnd()
-
 
2376
 
-
 
2377
  def write(self, oprot):
-
 
2378
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2379
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2380
      return
-
 
2381
    oprot.writeStructBegin('captureHdfcPayment_result')
-
 
2382
    if self.success != None:
-
 
2383
      oprot.writeFieldBegin('success', TType.MAP, 0)
-
 
2384
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
-
 
2385
      for kiter65,viter66 in self.success.items():
-
 
2386
        oprot.writeString(kiter65)
-
 
2387
        oprot.writeString(viter66)
-
 
2388
      oprot.writeMapEnd()
-
 
2389
      oprot.writeFieldEnd()
-
 
2390
    if self.pe != None:
-
 
2391
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
-
 
2392
      self.pe.write(oprot)
-
 
2393
      oprot.writeFieldEnd()
-
 
2394
    oprot.writeFieldStop()
-
 
2395
    oprot.writeStructEnd()
-
 
2396
 
-
 
2397
  def __repr__(self):
-
 
2398
    L = ['%s=%r' % (key, value)
-
 
2399
      for key, value in self.__dict__.iteritems()]
-
 
2400
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2401
 
-
 
2402
  def __eq__(self, other):
-
 
2403
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2404
 
-
 
2405
  def __ne__(self, other):
-
 
2406
    return not (self == other)
-
 
2407
 
-
 
2408
class initializeHdfcPayment_args:
-
 
2409
  """
-
 
2410
  Attributes:
-
 
2411
   - merchantPaymentId
-
 
2412
  """
-
 
2413
 
-
 
2414
  thrift_spec = (
-
 
2415
    None, # 0
-
 
2416
    (1, TType.I64, 'merchantPaymentId', None, None, ), # 1
-
 
2417
  )
-
 
2418
 
-
 
2419
  def __init__(self, merchantPaymentId=None,):
-
 
2420
    self.merchantPaymentId = merchantPaymentId
-
 
2421
 
-
 
2422
  def read(self, iprot):
-
 
2423
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2424
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2425
      return
-
 
2426
    iprot.readStructBegin()
-
 
2427
    while True:
-
 
2428
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2429
      if ftype == TType.STOP:
-
 
2430
        break
-
 
2431
      if fid == 1:
-
 
2432
        if ftype == TType.I64:
-
 
2433
          self.merchantPaymentId = iprot.readI64();
-
 
2434
        else:
-
 
2435
          iprot.skip(ftype)
-
 
2436
      else:
-
 
2437
        iprot.skip(ftype)
-
 
2438
      iprot.readFieldEnd()
-
 
2439
    iprot.readStructEnd()
-
 
2440
 
-
 
2441
  def write(self, oprot):
-
 
2442
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2443
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2444
      return
-
 
2445
    oprot.writeStructBegin('initializeHdfcPayment_args')
-
 
2446
    if self.merchantPaymentId != None:
-
 
2447
      oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)
-
 
2448
      oprot.writeI64(self.merchantPaymentId)
-
 
2449
      oprot.writeFieldEnd()
-
 
2450
    oprot.writeFieldStop()
-
 
2451
    oprot.writeStructEnd()
-
 
2452
 
-
 
2453
  def __repr__(self):
-
 
2454
    L = ['%s=%r' % (key, value)
-
 
2455
      for key, value in self.__dict__.iteritems()]
-
 
2456
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2457
 
-
 
2458
  def __eq__(self, other):
-
 
2459
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2460
 
-
 
2461
  def __ne__(self, other):
-
 
2462
    return not (self == other)
-
 
2463
 
-
 
2464
class initializeHdfcPayment_result:
-
 
2465
  """
-
 
2466
  Attributes:
-
 
2467
   - success
-
 
2468
   - pe
-
 
2469
  """
-
 
2470
 
-
 
2471
  thrift_spec = (
-
 
2472
    (0, TType.STRING, 'success', None, None, ), # 0
-
 
2473
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
-
 
2474
  )
-
 
2475
 
-
 
2476
  def __init__(self, success=None, pe=None,):
-
 
2477
    self.success = success
-
 
2478
    self.pe = pe
-
 
2479
 
-
 
2480
  def read(self, iprot):
-
 
2481
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2482
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2483
      return
-
 
2484
    iprot.readStructBegin()
-
 
2485
    while True:
-
 
2486
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2487
      if ftype == TType.STOP:
-
 
2488
        break
-
 
2489
      if fid == 0:
-
 
2490
        if ftype == TType.STRING:
-
 
2491
          self.success = iprot.readString();
-
 
2492
        else:
-
 
2493
          iprot.skip(ftype)
-
 
2494
      elif fid == 1:
-
 
2495
        if ftype == TType.STRUCT:
-
 
2496
          self.pe = PaymentException()
-
 
2497
          self.pe.read(iprot)
-
 
2498
        else:
-
 
2499
          iprot.skip(ftype)
-
 
2500
      else:
-
 
2501
        iprot.skip(ftype)
-
 
2502
      iprot.readFieldEnd()
-
 
2503
    iprot.readStructEnd()
-
 
2504
 
-
 
2505
  def write(self, oprot):
-
 
2506
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2507
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2508
      return
-
 
2509
    oprot.writeStructBegin('initializeHdfcPayment_result')
-
 
2510
    if self.success != None:
-
 
2511
      oprot.writeFieldBegin('success', TType.STRING, 0)
-
 
2512
      oprot.writeString(self.success)
-
 
2513
      oprot.writeFieldEnd()
-
 
2514
    if self.pe != None:
-
 
2515
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
-
 
2516
      self.pe.write(oprot)
-
 
2517
      oprot.writeFieldEnd()
-
 
2518
    oprot.writeFieldStop()
-
 
2519
    oprot.writeStructEnd()
-
 
2520
 
-
 
2521
  def __repr__(self):
1951
    L = ['%s=%r' % (key, value)
2522
    L = ['%s=%r' % (key, value)
1952
      for key, value in self.__dict__.iteritems()]
2523
      for key, value in self.__dict__.iteritems()]
1953
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2524
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1954
 
2525
 
1955
  def __eq__(self, other):
2526
  def __eq__(self, other):