Subversion Repositories SmartDukaan

Rev

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

Rev 2687 Rev 2708
Line 128... Line 128...
128
    Parameters:
128
    Parameters:
129
     - paymentParams
129
     - paymentParams
130
    """
130
    """
131
    pass
131
    pass
132
 
132
 
-
 
133
  def captureEbsPayment(self, merchantPaymentId):
-
 
134
    """
-
 
135
    Captures an already authorized EBS Payment and returns a map containing the details of the captured transaction
-
 
136
    
-
 
137
    Parameters:
-
 
138
     - merchantPaymentId
-
 
139
    """
-
 
140
    pass
-
 
141
 
133
  def captureHdfcPayment(self, merchantPaymentId):
142
  def captureHdfcPayment(self, merchantPaymentId):
134
    """
143
    """
135
    Captures an already authorized Hdfc Payment and returns a map containing the details of the capture transaction
144
    Captures an already authorized Hdfc Payment and returns a map containing the details of the captured transaction
136
    
145
    
137
    Parameters:
146
    Parameters:
138
     - merchantPaymentId
147
     - merchantPaymentId
139
    """
148
    """
140
    pass
149
    pass
Line 545... Line 554...
545
      return result.success
554
      return result.success
546
    if result.pe != None:
555
    if result.pe != None:
547
      raise result.pe
556
      raise result.pe
548
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateAndCaptureEbsPayment failed: unknown result");
557
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateAndCaptureEbsPayment failed: unknown result");
549
 
558
 
-
 
559
  def captureEbsPayment(self, merchantPaymentId):
-
 
560
    """
-
 
561
    Captures an already authorized EBS Payment and returns a map containing the details of the captured transaction
-
 
562
    
-
 
563
    Parameters:
-
 
564
     - merchantPaymentId
-
 
565
    """
-
 
566
    self.send_captureEbsPayment(merchantPaymentId)
-
 
567
    return self.recv_captureEbsPayment()
-
 
568
 
-
 
569
  def send_captureEbsPayment(self, merchantPaymentId):
-
 
570
    self._oprot.writeMessageBegin('captureEbsPayment', TMessageType.CALL, self._seqid)
-
 
571
    args = captureEbsPayment_args()
-
 
572
    args.merchantPaymentId = merchantPaymentId
-
 
573
    args.write(self._oprot)
-
 
574
    self._oprot.writeMessageEnd()
-
 
575
    self._oprot.trans.flush()
-
 
576
 
-
 
577
  def recv_captureEbsPayment(self, ):
-
 
578
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
579
    if mtype == TMessageType.EXCEPTION:
-
 
580
      x = TApplicationException()
-
 
581
      x.read(self._iprot)
-
 
582
      self._iprot.readMessageEnd()
-
 
583
      raise x
-
 
584
    result = captureEbsPayment_result()
-
 
585
    result.read(self._iprot)
-
 
586
    self._iprot.readMessageEnd()
-
 
587
    if result.success != None:
-
 
588
      return result.success
-
 
589
    if result.pe != None:
-
 
590
      raise result.pe
-
 
591
    raise TApplicationException(TApplicationException.MISSING_RESULT, "captureEbsPayment failed: unknown result");
-
 
592
 
550
  def captureHdfcPayment(self, merchantPaymentId):
593
  def captureHdfcPayment(self, merchantPaymentId):
551
    """
594
    """
552
    Captures an already authorized Hdfc Payment and returns a map containing the details of the capture transaction
595
    Captures an already authorized Hdfc Payment and returns a map containing the details of the captured transaction
553
    
596
    
554
    Parameters:
597
    Parameters:
555
     - merchantPaymentId
598
     - merchantPaymentId
556
    """
599
    """
557
    self.send_captureHdfcPayment(merchantPaymentId)
600
    self.send_captureHdfcPayment(merchantPaymentId)
Line 669... Line 712...
669
    self._processMap["getPayment"] = Processor.process_getPayment
712
    self._processMap["getPayment"] = Processor.process_getPayment
670
    self._processMap["getPaymentForTxnId"] = Processor.process_getPaymentForTxnId
713
    self._processMap["getPaymentForTxnId"] = Processor.process_getPaymentForTxnId
671
    self._processMap["updatePaymentDetails"] = Processor.process_updatePaymentDetails
714
    self._processMap["updatePaymentDetails"] = Processor.process_updatePaymentDetails
672
    self._processMap["getSuccessfulPaymentsAmountRange"] = Processor.process_getSuccessfulPaymentsAmountRange
715
    self._processMap["getSuccessfulPaymentsAmountRange"] = Processor.process_getSuccessfulPaymentsAmountRange
673
    self._processMap["updateAndCaptureEbsPayment"] = Processor.process_updateAndCaptureEbsPayment
716
    self._processMap["updateAndCaptureEbsPayment"] = Processor.process_updateAndCaptureEbsPayment
-
 
717
    self._processMap["captureEbsPayment"] = Processor.process_captureEbsPayment
674
    self._processMap["captureHdfcPayment"] = Processor.process_captureHdfcPayment
718
    self._processMap["captureHdfcPayment"] = Processor.process_captureHdfcPayment
675
    self._processMap["initializeHdfcPayment"] = Processor.process_initializeHdfcPayment
719
    self._processMap["initializeHdfcPayment"] = Processor.process_initializeHdfcPayment
676
    self._processMap["createRefund"] = Processor.process_createRefund
720
    self._processMap["createRefund"] = Processor.process_createRefund
677
 
721
 
678
  def process(self, iprot, oprot):
722
  def process(self, iprot, oprot):
Line 822... Line 866...
822
    oprot.writeMessageBegin("updateAndCaptureEbsPayment", TMessageType.REPLY, seqid)
866
    oprot.writeMessageBegin("updateAndCaptureEbsPayment", TMessageType.REPLY, seqid)
823
    result.write(oprot)
867
    result.write(oprot)
824
    oprot.writeMessageEnd()
868
    oprot.writeMessageEnd()
825
    oprot.trans.flush()
869
    oprot.trans.flush()
826
 
870
 
-
 
871
  def process_captureEbsPayment(self, seqid, iprot, oprot):
-
 
872
    args = captureEbsPayment_args()
-
 
873
    args.read(iprot)
-
 
874
    iprot.readMessageEnd()
-
 
875
    result = captureEbsPayment_result()
-
 
876
    try:
-
 
877
      result.success = self._handler.captureEbsPayment(args.merchantPaymentId)
-
 
878
    except PaymentException, pe:
-
 
879
      result.pe = pe
-
 
880
    oprot.writeMessageBegin("captureEbsPayment", TMessageType.REPLY, seqid)
-
 
881
    result.write(oprot)
-
 
882
    oprot.writeMessageEnd()
-
 
883
    oprot.trans.flush()
-
 
884
 
827
  def process_captureHdfcPayment(self, seqid, iprot, oprot):
885
  def process_captureHdfcPayment(self, seqid, iprot, oprot):
828
    args = captureHdfcPayment_args()
886
    args = captureHdfcPayment_args()
829
    args.read(iprot)
887
    args.read(iprot)
830
    iprot.readMessageEnd()
888
    iprot.readMessageEnd()
831
    result = captureHdfcPayment_result()
889
    result = captureHdfcPayment_result()
Line 2337... Line 2395...
2337
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2395
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2338
 
2396
 
2339
  def __ne__(self, other):
2397
  def __ne__(self, other):
2340
    return not (self == other)
2398
    return not (self == other)
2341
 
2399
 
2342
class captureHdfcPayment_args:
2400
class captureEbsPayment_args:
2343
  """
2401
  """
2344
  Attributes:
2402
  Attributes:
2345
   - merchantPaymentId
2403
   - merchantPaymentId
2346
  """
2404
  """
2347
 
2405
 
Line 2374... Line 2432...
2374
 
2432
 
2375
  def write(self, oprot):
2433
  def write(self, oprot):
2376
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2434
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2377
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2435
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2378
      return
2436
      return
2379
    oprot.writeStructBegin('captureHdfcPayment_args')
2437
    oprot.writeStructBegin('captureEbsPayment_args')
2380
    if self.merchantPaymentId != None:
2438
    if self.merchantPaymentId != None:
2381
      oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)
2439
      oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)
2382
      oprot.writeI64(self.merchantPaymentId)
2440
      oprot.writeI64(self.merchantPaymentId)
2383
      oprot.writeFieldEnd()
2441
      oprot.writeFieldEnd()
2384
    oprot.writeFieldStop()
2442
    oprot.writeFieldStop()
Line 2393... Line 2451...
2393
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2451
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2394
 
2452
 
2395
  def __ne__(self, other):
2453
  def __ne__(self, other):
2396
    return not (self == other)
2454
    return not (self == other)
2397
 
2455
 
2398
class captureHdfcPayment_result:
2456
class captureEbsPayment_result:
2399
  """
2457
  """
2400
  Attributes:
2458
  Attributes:
2401
   - success
2459
   - success
2402
   - pe
2460
   - pe
2403
  """
2461
  """
Line 2444... Line 2502...
2444
 
2502
 
2445
  def write(self, oprot):
2503
  def write(self, oprot):
2446
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2504
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2447
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2505
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2448
      return
2506
      return
2449
    oprot.writeStructBegin('captureHdfcPayment_result')
2507
    oprot.writeStructBegin('captureEbsPayment_result')
2450
    if self.success != None:
2508
    if self.success != None:
2451
      oprot.writeFieldBegin('success', TType.MAP, 0)
2509
      oprot.writeFieldBegin('success', TType.MAP, 0)
2452
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
2510
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
2453
      for kiter65,viter66 in self.success.items():
2511
      for kiter65,viter66 in self.success.items():
2454
        oprot.writeString(kiter65)
2512
        oprot.writeString(kiter65)
Line 2456... Line 2514...
2456
      oprot.writeMapEnd()
2514
      oprot.writeMapEnd()
2457
      oprot.writeFieldEnd()
2515
      oprot.writeFieldEnd()
2458
    if self.pe != None:
2516
    if self.pe != None:
2459
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2517
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2460
      self.pe.write(oprot)
2518
      self.pe.write(oprot)
-
 
2519
      oprot.writeFieldEnd()
-
 
2520
    oprot.writeFieldStop()
-
 
2521
    oprot.writeStructEnd()
-
 
2522
 
-
 
2523
  def __repr__(self):
-
 
2524
    L = ['%s=%r' % (key, value)
-
 
2525
      for key, value in self.__dict__.iteritems()]
-
 
2526
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2527
 
-
 
2528
  def __eq__(self, other):
-
 
2529
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2530
 
-
 
2531
  def __ne__(self, other):
-
 
2532
    return not (self == other)
-
 
2533
 
-
 
2534
class captureHdfcPayment_args:
-
 
2535
  """
-
 
2536
  Attributes:
-
 
2537
   - merchantPaymentId
-
 
2538
  """
-
 
2539
 
-
 
2540
  thrift_spec = (
-
 
2541
    None, # 0
-
 
2542
    (1, TType.I64, 'merchantPaymentId', None, None, ), # 1
-
 
2543
  )
-
 
2544
 
-
 
2545
  def __init__(self, merchantPaymentId=None,):
-
 
2546
    self.merchantPaymentId = merchantPaymentId
-
 
2547
 
-
 
2548
  def read(self, iprot):
-
 
2549
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2550
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2551
      return
-
 
2552
    iprot.readStructBegin()
-
 
2553
    while True:
-
 
2554
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2555
      if ftype == TType.STOP:
-
 
2556
        break
-
 
2557
      if fid == 1:
-
 
2558
        if ftype == TType.I64:
-
 
2559
          self.merchantPaymentId = iprot.readI64();
-
 
2560
        else:
-
 
2561
          iprot.skip(ftype)
-
 
2562
      else:
-
 
2563
        iprot.skip(ftype)
-
 
2564
      iprot.readFieldEnd()
-
 
2565
    iprot.readStructEnd()
-
 
2566
 
-
 
2567
  def write(self, oprot):
-
 
2568
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2569
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2570
      return
-
 
2571
    oprot.writeStructBegin('captureHdfcPayment_args')
-
 
2572
    if self.merchantPaymentId != None:
-
 
2573
      oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)
-
 
2574
      oprot.writeI64(self.merchantPaymentId)
-
 
2575
      oprot.writeFieldEnd()
-
 
2576
    oprot.writeFieldStop()
-
 
2577
    oprot.writeStructEnd()
-
 
2578
 
-
 
2579
  def __repr__(self):
-
 
2580
    L = ['%s=%r' % (key, value)
-
 
2581
      for key, value in self.__dict__.iteritems()]
-
 
2582
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2583
 
-
 
2584
  def __eq__(self, other):
-
 
2585
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2586
 
-
 
2587
  def __ne__(self, other):
-
 
2588
    return not (self == other)
-
 
2589
 
-
 
2590
class captureHdfcPayment_result:
-
 
2591
  """
-
 
2592
  Attributes:
-
 
2593
   - success
-
 
2594
   - pe
-
 
2595
  """
-
 
2596
 
-
 
2597
  thrift_spec = (
-
 
2598
    (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0
-
 
2599
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
-
 
2600
  )
-
 
2601
 
-
 
2602
  def __init__(self, success=None, pe=None,):
-
 
2603
    self.success = success
-
 
2604
    self.pe = pe
-
 
2605
 
-
 
2606
  def read(self, iprot):
-
 
2607
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2608
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2609
      return
-
 
2610
    iprot.readStructBegin()
-
 
2611
    while True:
-
 
2612
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2613
      if ftype == TType.STOP:
-
 
2614
        break
-
 
2615
      if fid == 0:
-
 
2616
        if ftype == TType.MAP:
-
 
2617
          self.success = {}
-
 
2618
          (_ktype68, _vtype69, _size67 ) = iprot.readMapBegin() 
-
 
2619
          for _i71 in xrange(_size67):
-
 
2620
            _key72 = iprot.readString();
-
 
2621
            _val73 = iprot.readString();
-
 
2622
            self.success[_key72] = _val73
-
 
2623
          iprot.readMapEnd()
-
 
2624
        else:
-
 
2625
          iprot.skip(ftype)
-
 
2626
      elif fid == 1:
-
 
2627
        if ftype == TType.STRUCT:
-
 
2628
          self.pe = PaymentException()
-
 
2629
          self.pe.read(iprot)
-
 
2630
        else:
-
 
2631
          iprot.skip(ftype)
-
 
2632
      else:
-
 
2633
        iprot.skip(ftype)
-
 
2634
      iprot.readFieldEnd()
-
 
2635
    iprot.readStructEnd()
-
 
2636
 
-
 
2637
  def write(self, oprot):
-
 
2638
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2639
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2640
      return
-
 
2641
    oprot.writeStructBegin('captureHdfcPayment_result')
-
 
2642
    if self.success != None:
-
 
2643
      oprot.writeFieldBegin('success', TType.MAP, 0)
-
 
2644
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
-
 
2645
      for kiter74,viter75 in self.success.items():
-
 
2646
        oprot.writeString(kiter74)
-
 
2647
        oprot.writeString(viter75)
-
 
2648
      oprot.writeMapEnd()
-
 
2649
      oprot.writeFieldEnd()
-
 
2650
    if self.pe != None:
-
 
2651
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
-
 
2652
      self.pe.write(oprot)
2461
      oprot.writeFieldEnd()
2653
      oprot.writeFieldEnd()
2462
    oprot.writeFieldStop()
2654
    oprot.writeFieldStop()
2463
    oprot.writeStructEnd()
2655
    oprot.writeStructEnd()
2464
 
2656
 
2465
  def __repr__(self):
2657
  def __repr__(self):