|
@@ 128-149 (lines=22) @@
|
| 125 |
|
if hasattr(response.transactionResponse, 'transId') == True: |
| 126 |
|
self.assertIsNotNone(response.transactionResponse.transId) |
| 127 |
|
|
| 128 |
|
def testAuthOnlyContinueTransaction(self): |
| 129 |
|
transactionrequesttype = apicontractsv1.transactionRequestType() |
| 130 |
|
transactionrequesttype.transactionType = "authCaptureTransaction" |
| 131 |
|
transactionrequesttype.amount = self.amount |
| 132 |
|
transactionrequesttype.payment = self.payment |
| 133 |
|
transactionrequesttype.order = self.order |
| 134 |
|
transactionrequesttype.customer = self.customerData |
| 135 |
|
transactionrequesttype.billTo = self.billTo |
| 136 |
|
createtransactionrequest = apicontractsv1.createTransactionRequest() |
| 137 |
|
createtransactionrequest.merchantAuthentication = self.merchantAuthentication |
| 138 |
|
createtransactionrequest.refId = self.ref_id |
| 139 |
|
createtransactionrequest.transactionRequest = transactionrequesttype |
| 140 |
|
createtransactioncontroller = createTransactionController(createtransactionrequest) |
| 141 |
|
createtransactioncontroller.execute() |
| 142 |
|
response = createtransactioncontroller.getresponse() |
| 143 |
|
if hasattr(response, 'messages') == True: |
| 144 |
|
if hasattr(response.messages, 'resultCode') == True: |
| 145 |
|
self.assertEquals('Ok', response.messages.resultCode) |
| 146 |
|
if hasattr(response, 'transactionResponse') == True: |
| 147 |
|
self.assertIsNotNone(response.transactionResponse) |
| 148 |
|
if hasattr(response.transactionResponse, 'transId') == True: |
| 149 |
|
self.assertIsNotNone(response.transactionResponse.transId) |
| 150 |
|
|
| 151 |
|
class test_CustomerProfile(apitestbase.ApiTestBase): |
| 152 |
|
def testCreateCustomerProfile(self): |
|
@@ 105-126 (lines=22) @@
|
| 102 |
|
self.assertEquals('Ok', response.messages.resultCode) |
| 103 |
|
|
| 104 |
|
class test_paymentTransactionUnitTest(apitestbase.ApiTestBase): |
| 105 |
|
def testAuthCaptureTransaction(self): |
| 106 |
|
transactionrequesttype = apicontractsv1.transactionRequestType() |
| 107 |
|
transactionrequesttype.transactionType = "authCaptureTransaction" |
| 108 |
|
transactionrequesttype.amount = self.amount |
| 109 |
|
transactionrequesttype.payment = self.payment |
| 110 |
|
transactionrequesttype.order = self.order |
| 111 |
|
transactionrequesttype.customer = self.customerData |
| 112 |
|
transactionrequesttype.billTo = self.billTo |
| 113 |
|
createtransactionrequest = apicontractsv1.createTransactionRequest() |
| 114 |
|
createtransactionrequest.merchantAuthentication = self.merchantAuthentication |
| 115 |
|
createtransactionrequest.refId = self.ref_id |
| 116 |
|
createtransactionrequest.transactionRequest = transactionrequesttype |
| 117 |
|
createtransactioncontroller = createTransactionController(createtransactionrequest) |
| 118 |
|
createtransactioncontroller.execute() |
| 119 |
|
response = createtransactioncontroller.getresponse() |
| 120 |
|
if hasattr(response, 'messages') == True: |
| 121 |
|
if hasattr(response.messages, 'resultCode') == True: |
| 122 |
|
self.assertEquals('Ok', response.messages.resultCode) |
| 123 |
|
if hasattr(response, 'transactionResponse') == True: |
| 124 |
|
self.assertIsNotNone(response.transactionResponse) |
| 125 |
|
if hasattr(response.transactionResponse, 'transId') == True: |
| 126 |
|
self.assertIsNotNone(response.transactionResponse.transId) |
| 127 |
|
|
| 128 |
|
def testAuthOnlyContinueTransaction(self): |
| 129 |
|
transactionrequesttype = apicontractsv1.transactionRequestType() |