From 3561ed393ca1509864ad858a5270b9dfdee43c09 Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Mon, 27 Aug 2018 19:47:53 +0530 Subject: [PATCH 01/27] paymnet transactions folder updated - exp date changed --- PaymentTransactions/authorize-credit-card.rb | 2 +- .../capture-funds-authorized-through-another-channel.rb | 2 +- PaymentTransactions/capture-previously-authorized-amount.rb | 2 +- PaymentTransactions/charge-credit-card.rb | 2 +- PaymentTransactions/charge-tokenized-credit-card.rb | 2 +- PaymentTransactions/void-transaction.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PaymentTransactions/authorize-credit-card.rb b/PaymentTransactions/authorize-credit-card.rb index 2711a73..54cd3c6 100644 --- a/PaymentTransactions/authorize-credit-card.rb +++ b/PaymentTransactions/authorize-credit-card.rb @@ -15,7 +15,7 @@ def authorize_credit_card() request.transactionRequest = TransactionRequestType.new() request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 150 ).round(2) request.transactionRequest.payment = PaymentType.new - request.transactionRequest.payment.creditCard = CreditCardType.new("4242424242424242","0220","123") + request.transactionRequest.payment.creditCard = CreditCardType.new("4242424242424242","0728","123") request.transactionRequest.customer = CustomerDataType.new(CustomerTypeEnum::Individual,"CUST-1234","bmc@mail.com",DriversLicenseType.new("DrivLicenseNumber123","WA","05/05/1990"),"123456789") request.transactionRequest.billTo = CustomerAddressType.new("firstNameBT","lastNameBT","companyBT","addressBT","New York","NY", "10010","USA","2121111111","2121111111") diff --git a/PaymentTransactions/capture-funds-authorized-through-another-channel.rb b/PaymentTransactions/capture-funds-authorized-through-another-channel.rb index a8263cb..fc93802 100644 --- a/PaymentTransactions/capture-funds-authorized-through-another-channel.rb +++ b/PaymentTransactions/capture-funds-authorized-through-another-channel.rb @@ -15,7 +15,7 @@ def capture_funds_authorized_through_another_channel() request.transactionRequest = TransactionRequestType.new() request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 150 ).round(2) request.transactionRequest.payment = PaymentType.new - request.transactionRequest.payment.creditCard = CreditCardType.new('4111111111111111','0718') + request.transactionRequest.payment.creditCard = CreditCardType.new('4111111111111111','0728') request.transactionRequest.transactionType = TransactionTypeEnum::CaptureOnlyTransaction request.transactionRequest.authCode = "ROHNFQ" diff --git a/PaymentTransactions/capture-previously-authorized-amount.rb b/PaymentTransactions/capture-previously-authorized-amount.rb index 351db83..0fbe16c 100644 --- a/PaymentTransactions/capture-previously-authorized-amount.rb +++ b/PaymentTransactions/capture-previously-authorized-amount.rb @@ -17,7 +17,7 @@ def capture_previously_authorized_amount() random_amount = ((SecureRandom.random_number + 1 ) * 150 ).round(2) request.transactionRequest.amount = random_amount request.transactionRequest.payment = PaymentType.new - request.transactionRequest.payment.creditCard = CreditCardType.new('4242424242424242','0220','123') + request.transactionRequest.payment.creditCard = CreditCardType.new('4242424242424242','0728','123') request.transactionRequest.transactionType = TransactionTypeEnum::AuthOnlyTransaction response = transaction.create_transaction(request) diff --git a/PaymentTransactions/charge-credit-card.rb b/PaymentTransactions/charge-credit-card.rb index 8ab6e18..06f4318 100644 --- a/PaymentTransactions/charge-credit-card.rb +++ b/PaymentTransactions/charge-credit-card.rb @@ -15,7 +15,7 @@ def charge_credit_card() request.transactionRequest = TransactionRequestType.new() request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 150 ).round(2) request.transactionRequest.payment = PaymentType.new - request.transactionRequest.payment.creditCard = CreditCardType.new("4242424242424242","0220","123") + request.transactionRequest.payment.creditCard = CreditCardType.new("4242424242424242","0728","123") request.transactionRequest.customer = CustomerDataType.new(CustomerTypeEnum::Individual,"CUST-1234","bmc@mail.com",DriversLicenseType.new("DrivLicenseNumber123","WA","05/05/1990"),"123456789") request.transactionRequest.billTo = CustomerAddressType.new("firstNameBT","lastNameBT","companyBT","addressBT","New York","NY", "10010","USA","2121111111","2121111111") diff --git a/PaymentTransactions/charge-tokenized-credit-card.rb b/PaymentTransactions/charge-tokenized-credit-card.rb index 993003b..ebf0ea0 100644 --- a/PaymentTransactions/charge-tokenized-credit-card.rb +++ b/PaymentTransactions/charge-tokenized-credit-card.rb @@ -16,7 +16,7 @@ def charge_tokenized_credit_card() request.transactionRequest.transactionType = TransactionTypeEnum::AuthCaptureTransaction request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 150 ).round(2) request.transactionRequest.payment = PaymentType.new - request.transactionRequest.payment.creditCard = CreditCardType.new('4242424242424242','0220','123',nil,"EjRWeJASNFZ4kBI0VniQEjRWeJA=") + request.transactionRequest.payment.creditCard = CreditCardType.new('4242424242424242','0728','123',nil,"EjRWeJASNFZ4kBI0VniQEjRWeJA=") request.transactionRequest.order = OrderType.new("invoiceNumber#{(SecureRandom.random_number*1000000).round(0)}","Order Description") response = transaction.create_transaction(request) diff --git a/PaymentTransactions/void-transaction.rb b/PaymentTransactions/void-transaction.rb index 632ef93..070ead2 100644 --- a/PaymentTransactions/void-transaction.rb +++ b/PaymentTransactions/void-transaction.rb @@ -15,7 +15,7 @@ def void_transaction() request.transactionRequest = TransactionRequestType.new() request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 150 ).round(2) request.transactionRequest.payment = PaymentType.new - request.transactionRequest.payment.creditCard = CreditCardType.new('4242424242424242','0220','123') + request.transactionRequest.payment.creditCard = CreditCardType.new('4242424242424242','0728','123') request.transactionRequest.transactionType = TransactionTypeEnum::AuthCaptureTransaction response = transaction.create_transaction(request) From 2ada2604531e5db744935f35793a7226aad4e366 Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Mon, 27 Aug 2018 19:54:38 +0530 Subject: [PATCH 02/27] Create sub updated - expdate chnaged --- RecurringBilling/create-subscription.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecurringBilling/create-subscription.rb b/RecurringBilling/create-subscription.rb index 04d78da..4d73b1e 100644 --- a/RecurringBilling/create-subscription.rb +++ b/RecurringBilling/create-subscription.rb @@ -25,7 +25,7 @@ def create_Subscription() request.subscription.amount = random_amount request.subscription.trialAmount = 0.00 request.subscription.payment = PaymentType.new - request.subscription.payment.creditCard = CreditCardType.new('4111111111111111','0120','123') + request.subscription.payment.creditCard = CreditCardType.new('4111111111111111','0728','123') request.subscription.order = OrderType.new('invoiceNumber123','description123') request.subscription.customer = CustomerType.new(CustomerTypeEnum::Individual,'custId1','a@a.com') From dc965bf80cca651d4be8ef57dd6c5fea361dbe86 Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Mon, 27 Aug 2018 23:04:52 +0530 Subject: [PATCH 03/27] in void transactions, changed expdate to old one(testing purpose) --- PaymentTransactions/void-transaction.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PaymentTransactions/void-transaction.rb b/PaymentTransactions/void-transaction.rb index 070ead2..632ef93 100644 --- a/PaymentTransactions/void-transaction.rb +++ b/PaymentTransactions/void-transaction.rb @@ -15,7 +15,7 @@ def void_transaction() request.transactionRequest = TransactionRequestType.new() request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 150 ).round(2) request.transactionRequest.payment = PaymentType.new - request.transactionRequest.payment.creditCard = CreditCardType.new('4242424242424242','0728','123') + request.transactionRequest.payment.creditCard = CreditCardType.new('4242424242424242','0220','123') request.transactionRequest.transactionType = TransactionTypeEnum::AuthCaptureTransaction response = transaction.create_transaction(request) From ddf1d71d0f6f8a7e21af4347ce57500e7a005a14 Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Mon, 27 Aug 2018 23:12:22 +0530 Subject: [PATCH 04/27] in void transactions, changed to 0728 --- PaymentTransactions/void-transaction.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PaymentTransactions/void-transaction.rb b/PaymentTransactions/void-transaction.rb index 632ef93..070ead2 100644 --- a/PaymentTransactions/void-transaction.rb +++ b/PaymentTransactions/void-transaction.rb @@ -15,7 +15,7 @@ def void_transaction() request.transactionRequest = TransactionRequestType.new() request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 150 ).round(2) request.transactionRequest.payment = PaymentType.new - request.transactionRequest.payment.creditCard = CreditCardType.new('4242424242424242','0220','123') + request.transactionRequest.payment.creditCard = CreditCardType.new('4242424242424242','0728','123') request.transactionRequest.transactionType = TransactionTypeEnum::AuthCaptureTransaction response = transaction.create_transaction(request) From b134ed7ad17aad6f564b3a55d246eaf09b356bc7 Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 10:37:40 +0530 Subject: [PATCH 05/27] added 'error validation' for checking purpose --- spec/sample_code_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/sample_code_spec.rb b/spec/sample_code_spec.rb index 9cfa3c9..df47c0f 100644 --- a/spec/sample_code_spec.rb +++ b/spec/sample_code_spec.rb @@ -48,6 +48,8 @@ def validate_response(response= nil) expect(response.messages).not_to eq(nil) expect(response.messages.resultCode).not_to eq(nil) expect(response.messages.resultCode).to eq(MessageTypeEnum::Ok) + expect(response.messages.resultCode).to eq(MessageTypeEnum::Error) + end it "should be able to run all Customer Profile sample code" do From 4c8655935162fa524b641573d44e00ac8f5fadc2 Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 10:45:42 +0530 Subject: [PATCH 06/27] removed 'error validation' for checking purpose --- spec/sample_code_spec.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/spec/sample_code_spec.rb b/spec/sample_code_spec.rb index df47c0f..9cfa3c9 100644 --- a/spec/sample_code_spec.rb +++ b/spec/sample_code_spec.rb @@ -48,8 +48,6 @@ def validate_response(response= nil) expect(response.messages).not_to eq(nil) expect(response.messages.resultCode).not_to eq(nil) expect(response.messages.resultCode).to eq(MessageTypeEnum::Ok) - expect(response.messages.resultCode).to eq(MessageTypeEnum::Error) - end it "should be able to run all Customer Profile sample code" do From 14d7988b8a022b48e4caa524ec07c83ab6057dbe Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 10:53:18 +0530 Subject: [PATCH 07/27] testing only authorize_credit_card in payment transac --- spec/sample_code_spec.rb | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/spec/sample_code_spec.rb b/spec/sample_code_spec.rb index 9cfa3c9..40043b7 100644 --- a/spec/sample_code_spec.rb +++ b/spec/sample_code_spec.rb @@ -160,51 +160,51 @@ def validate_response(response= nil) response = authorize_credit_card() validate_response(response) - response = capture_funds_authorized_through_another_channel() - validate_response(response) + #response = capture_funds_authorized_through_another_channel() + #validate_response(response) # response = capture_only() # validate_response(response) - response = capture_funds_authorized_through_another_channel() - validate_response(response) + #response = capture_funds_authorized_through_another_channel() + #validate_response(response) - response = capture_previously_authorized_amount() - validate_response(response) + #response = capture_previously_authorized_amount() + #validate_response(response) - response = charge_credit_card() - validate_response(response) + #response = charge_credit_card() + #validate_response(response) #create customer profile - response = create_customer_profile() - validate_response(response) - customerProfileId = response.customerProfileId + #response = create_customer_profile() + #validate_response(response) + #customerProfileId = response.customerProfileId #create customer payment profile - response = create_customer_payment_profile(customerProfileId) - validate_response(response) - customerPaymentProfileId = response.customerPaymentProfileId + #response = create_customer_payment_profile(customerProfileId) + #validate_response(response) + #customerPaymentProfileId = response.customerPaymentProfileId - response = charge_customer_profile(customerProfileId, customerPaymentProfileId) - validate_response(response) + #response = charge_customer_profile(customerProfileId, customerPaymentProfileId) + #validate_response(response) - response = charge_tokenized_credit_card() - validate_response(response) + #response = charge_tokenized_credit_card() + #validate_response(response) - response = credit_bank_account() - validate_response(response) + #response = credit_bank_account() + #validate_response(response) - response = debit_bank_account() - validate_response(response) + #response = debit_bank_account() + #validate_response(response) # response = refund_transaction() # validate_response(response) - response = update_split_tender_group() - validate_response(response) + #response = update_split_tender_group() + #validate_response(response) - response = void_transaction() - validate_response(response) + #response = void_transaction() + #validate_response(response) end From 8100ac94e470613e0483eaea07ff210e57f1f1c1 Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 11:04:48 +0530 Subject: [PATCH 08/27] testing capture_funds_authorized_through_another_channel in payment transac --- spec/sample_code_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/sample_code_spec.rb b/spec/sample_code_spec.rb index 40043b7..cb3a7d5 100644 --- a/spec/sample_code_spec.rb +++ b/spec/sample_code_spec.rb @@ -157,12 +157,12 @@ def validate_response(response= nil) it "should be able to run all Payment Transaction sample code" do puts "START - Payment Transactions" - response = authorize_credit_card() - validate_response(response) - - #response = capture_funds_authorized_through_another_channel() + #response = authorize_credit_card() #validate_response(response) + response = capture_funds_authorized_through_another_channel() + validate_response(response) + # response = capture_only() # validate_response(response) From 72787a00080e230ee4d3a00920bf601b1a5d05ef Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 11:23:45 +0530 Subject: [PATCH 09/27] sample_code_spec.rb is changed back to original and changed routing, acconunt info credit bank acoount --- PaymentTransactions/credit-bank-account.rb | 2 +- spec/sample_code_spec.rb | 52 +++++++++++----------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/PaymentTransactions/credit-bank-account.rb b/PaymentTransactions/credit-bank-account.rb index 8cdd761..f3b2ce4 100644 --- a/PaymentTransactions/credit-bank-account.rb +++ b/PaymentTransactions/credit-bank-account.rb @@ -15,7 +15,7 @@ def credit_bank_account() request.transactionRequest = TransactionRequestType.new() request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 15 ).round(2) request.transactionRequest.payment = PaymentType.new - request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','125008547','1234567890', 'John Doe','PPD','Wells Fargo Bank NA','101') + request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','125000105','1234567890', 'John Doe','PPD','Wells Fargo Bank NA','101') request.transactionRequest.transactionType = TransactionTypeEnum::RefundTransaction response = transaction.create_transaction(request) diff --git a/spec/sample_code_spec.rb b/spec/sample_code_spec.rb index cb3a7d5..9cfa3c9 100644 --- a/spec/sample_code_spec.rb +++ b/spec/sample_code_spec.rb @@ -157,8 +157,8 @@ def validate_response(response= nil) it "should be able to run all Payment Transaction sample code" do puts "START - Payment Transactions" - #response = authorize_credit_card() - #validate_response(response) + response = authorize_credit_card() + validate_response(response) response = capture_funds_authorized_through_another_channel() validate_response(response) @@ -166,45 +166,45 @@ def validate_response(response= nil) # response = capture_only() # validate_response(response) - #response = capture_funds_authorized_through_another_channel() - #validate_response(response) + response = capture_funds_authorized_through_another_channel() + validate_response(response) - #response = capture_previously_authorized_amount() - #validate_response(response) + response = capture_previously_authorized_amount() + validate_response(response) - #response = charge_credit_card() - #validate_response(response) + response = charge_credit_card() + validate_response(response) #create customer profile - #response = create_customer_profile() - #validate_response(response) - #customerProfileId = response.customerProfileId + response = create_customer_profile() + validate_response(response) + customerProfileId = response.customerProfileId #create customer payment profile - #response = create_customer_payment_profile(customerProfileId) - #validate_response(response) - #customerPaymentProfileId = response.customerPaymentProfileId + response = create_customer_payment_profile(customerProfileId) + validate_response(response) + customerPaymentProfileId = response.customerPaymentProfileId - #response = charge_customer_profile(customerProfileId, customerPaymentProfileId) - #validate_response(response) + response = charge_customer_profile(customerProfileId, customerPaymentProfileId) + validate_response(response) - #response = charge_tokenized_credit_card() - #validate_response(response) + response = charge_tokenized_credit_card() + validate_response(response) - #response = credit_bank_account() - #validate_response(response) + response = credit_bank_account() + validate_response(response) - #response = debit_bank_account() - #validate_response(response) + response = debit_bank_account() + validate_response(response) # response = refund_transaction() # validate_response(response) - #response = update_split_tender_group() - #validate_response(response) + response = update_split_tender_group() + validate_response(response) - #response = void_transaction() - #validate_response(response) + response = void_transaction() + validate_response(response) end From a3232d386080a5f4d16d6814851fc8ba277d56fe Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 11:31:24 +0530 Subject: [PATCH 10/27] testing capture_funds_authorized_through_another_channel in payment transac --- spec/sample_code_spec.rb | 44 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/spec/sample_code_spec.rb b/spec/sample_code_spec.rb index 9cfa3c9..4ff5464 100644 --- a/spec/sample_code_spec.rb +++ b/spec/sample_code_spec.rb @@ -169,42 +169,42 @@ def validate_response(response= nil) response = capture_funds_authorized_through_another_channel() validate_response(response) - response = capture_previously_authorized_amount() - validate_response(response) + #response = capture_previously_authorized_amount() + #validate_response(response) - response = charge_credit_card() - validate_response(response) + #response = charge_credit_card() + #validate_response(response) #create customer profile - response = create_customer_profile() - validate_response(response) - customerProfileId = response.customerProfileId + #response = create_customer_profile() + #validate_response(response) + #customerProfileId = response.customerProfileId #create customer payment profile - response = create_customer_payment_profile(customerProfileId) - validate_response(response) - customerPaymentProfileId = response.customerPaymentProfileId + #response = create_customer_payment_profile(customerProfileId) + #validate_response(response) + #customerPaymentProfileId = response.customerPaymentProfileId - response = charge_customer_profile(customerProfileId, customerPaymentProfileId) - validate_response(response) + #response = charge_customer_profile(customerProfileId, customerPaymentProfileId) + #validate_response(response) - response = charge_tokenized_credit_card() - validate_response(response) + #response = charge_tokenized_credit_card() + #validate_response(response) - response = credit_bank_account() - validate_response(response) + #response = credit_bank_account() + #validate_response(response) - response = debit_bank_account() - validate_response(response) + #response = debit_bank_account() + #validate_response(response) # response = refund_transaction() # validate_response(response) - response = update_split_tender_group() - validate_response(response) + #response = update_split_tender_group() + #validate_response(response) - response = void_transaction() - validate_response(response) + #response = void_transaction() + #validate_response(response) end From 5fb4ffeafbffb2e91089e8ae6576a9c41aa383b2 Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 11:35:54 +0530 Subject: [PATCH 11/27] testing capture_previously_authorized_amount in payment transac --- spec/sample_code_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/sample_code_spec.rb b/spec/sample_code_spec.rb index 4ff5464..3c690ee 100644 --- a/spec/sample_code_spec.rb +++ b/spec/sample_code_spec.rb @@ -169,8 +169,8 @@ def validate_response(response= nil) response = capture_funds_authorized_through_another_channel() validate_response(response) - #response = capture_previously_authorized_amount() - #validate_response(response) + response = capture_previously_authorized_amount() + validate_response(response) #response = charge_credit_card() #validate_response(response) From 43d67e01bd0cf2d18d06e24a4131afcdf519447f Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 11:42:47 +0530 Subject: [PATCH 12/27] testing charge_credit_card and customer profiles related in payment transac --- spec/sample_code_spec.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/spec/sample_code_spec.rb b/spec/sample_code_spec.rb index 3c690ee..099ac39 100644 --- a/spec/sample_code_spec.rb +++ b/spec/sample_code_spec.rb @@ -172,21 +172,21 @@ def validate_response(response= nil) response = capture_previously_authorized_amount() validate_response(response) - #response = charge_credit_card() - #validate_response(response) + response = charge_credit_card() + validate_response(response) #create customer profile - #response = create_customer_profile() - #validate_response(response) - #customerProfileId = response.customerProfileId + response = create_customer_profile() + validate_response(response) + customerProfileId = response.customerProfileId #create customer payment profile - #response = create_customer_payment_profile(customerProfileId) - #validate_response(response) - #customerPaymentProfileId = response.customerPaymentProfileId + response = create_customer_payment_profile(customerProfileId) + validate_response(response) + customerPaymentProfileId = response.customerPaymentProfileId - #response = charge_customer_profile(customerProfileId, customerPaymentProfileId) - #validate_response(response) + response = charge_customer_profile(customerProfileId, customerPaymentProfileId) + validate_response(response) #response = charge_tokenized_credit_card() #validate_response(response) From 55fb08baa7649e95a5ae2a54119cdd1d7a3b8bd0 Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 11:48:36 +0530 Subject: [PATCH 13/27] testing tokenized credit card, credit and debit bank account and changed routing number in debit bank account.rb --- PaymentTransactions/debit-bank-account.rb | 2 +- spec/sample_code_spec.rb | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/PaymentTransactions/debit-bank-account.rb b/PaymentTransactions/debit-bank-account.rb index 55221e1..0eb3da7 100644 --- a/PaymentTransactions/debit-bank-account.rb +++ b/PaymentTransactions/debit-bank-account.rb @@ -15,7 +15,7 @@ def debit_bank_account() request.transactionRequest = TransactionRequestType.new() request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 15 ).round(2) request.transactionRequest.payment = PaymentType.new - request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','125008547','1234567890', 'John Doe','WEB','Wells Fargo Bank NA','101') + request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','125000105','1234567890', 'John Doe','WEB','Wells Fargo Bank NA','101') request.transactionRequest.transactionType = TransactionTypeEnum::AuthCaptureTransaction request.transactionRequest.order = OrderType.new("invoiceNumber#{(SecureRandom.random_number*1000000).round(0)}","Order Description") diff --git a/spec/sample_code_spec.rb b/spec/sample_code_spec.rb index 099ac39..9b0e0df 100644 --- a/spec/sample_code_spec.rb +++ b/spec/sample_code_spec.rb @@ -188,14 +188,14 @@ def validate_response(response= nil) response = charge_customer_profile(customerProfileId, customerPaymentProfileId) validate_response(response) - #response = charge_tokenized_credit_card() - #validate_response(response) + response = charge_tokenized_credit_card() + validate_response(response) - #response = credit_bank_account() - #validate_response(response) + response = credit_bank_account() + validate_response(response) - #response = debit_bank_account() - #validate_response(response) + response = debit_bank_account() + validate_response(response) # response = refund_transaction() # validate_response(response) From 0e2645e372602bf9fd544caf2a5a6d12820361ab Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 11:53:02 +0530 Subject: [PATCH 14/27] testing tokenized credit card --- spec/sample_code_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/sample_code_spec.rb b/spec/sample_code_spec.rb index 9b0e0df..5f5f650 100644 --- a/spec/sample_code_spec.rb +++ b/spec/sample_code_spec.rb @@ -191,11 +191,11 @@ def validate_response(response= nil) response = charge_tokenized_credit_card() validate_response(response) - response = credit_bank_account() - validate_response(response) + #response = credit_bank_account() + #validate_response(response) - response = debit_bank_account() - validate_response(response) + #response = debit_bank_account() + #validate_response(response) # response = refund_transaction() # validate_response(response) From 24893724f623dffa0933699b33eb19f6dd1a6a54 Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 11:56:59 +0530 Subject: [PATCH 15/27] testing update split, void --- spec/sample_code_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/sample_code_spec.rb b/spec/sample_code_spec.rb index 5f5f650..4657c71 100644 --- a/spec/sample_code_spec.rb +++ b/spec/sample_code_spec.rb @@ -200,11 +200,11 @@ def validate_response(response= nil) # response = refund_transaction() # validate_response(response) - #response = update_split_tender_group() - #validate_response(response) + response = update_split_tender_group() + validate_response(response) - #response = void_transaction() - #validate_response(response) + response = void_transaction() + validate_response(response) end From b858db12d2469c6d43e2a920effb13bc56057945 Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 12:00:48 +0530 Subject: [PATCH 16/27] testing credit ban account --- spec/sample_code_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/sample_code_spec.rb b/spec/sample_code_spec.rb index 4657c71..06915c4 100644 --- a/spec/sample_code_spec.rb +++ b/spec/sample_code_spec.rb @@ -191,8 +191,8 @@ def validate_response(response= nil) response = charge_tokenized_credit_card() validate_response(response) - #response = credit_bank_account() - #validate_response(response) + response = credit_bank_account() + validate_response(response) #response = debit_bank_account() #validate_response(response) From 3debfab4ef21f33329de2eda98a68aebf4de2223 Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 12:07:33 +0530 Subject: [PATCH 17/27] testing only credit bank account and chnaged routing number to 122000661 --- PaymentTransactions/credit-bank-account.rb | 2 +- spec/sample_code_spec.rb | 48 +++++++++++----------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/PaymentTransactions/credit-bank-account.rb b/PaymentTransactions/credit-bank-account.rb index f3b2ce4..f2742ca 100644 --- a/PaymentTransactions/credit-bank-account.rb +++ b/PaymentTransactions/credit-bank-account.rb @@ -15,7 +15,7 @@ def credit_bank_account() request.transactionRequest = TransactionRequestType.new() request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 15 ).round(2) request.transactionRequest.payment = PaymentType.new - request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','125000105','1234567890', 'John Doe','PPD','Wells Fargo Bank NA','101') + request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','122000661','1234567890', 'John Doe','PPD','Wells Fargo Bank NA','101') request.transactionRequest.transactionType = TransactionTypeEnum::RefundTransaction response = transaction.create_transaction(request) diff --git a/spec/sample_code_spec.rb b/spec/sample_code_spec.rb index 06915c4..1db7d7f 100644 --- a/spec/sample_code_spec.rb +++ b/spec/sample_code_spec.rb @@ -157,39 +157,39 @@ def validate_response(response= nil) it "should be able to run all Payment Transaction sample code" do puts "START - Payment Transactions" - response = authorize_credit_card() - validate_response(response) + #response = authorize_credit_card() + #validate_response(response) - response = capture_funds_authorized_through_another_channel() - validate_response(response) + #response = capture_funds_authorized_through_another_channel() + #validate_response(response) # response = capture_only() # validate_response(response) - response = capture_funds_authorized_through_another_channel() - validate_response(response) + #response = capture_funds_authorized_through_another_channel() + #validate_response(response) - response = capture_previously_authorized_amount() - validate_response(response) + #response = capture_previously_authorized_amount() + #validate_response(response) - response = charge_credit_card() - validate_response(response) + #response = charge_credit_card() + #validate_response(response) #create customer profile - response = create_customer_profile() - validate_response(response) - customerProfileId = response.customerProfileId + #response = create_customer_profile() + #validate_response(response) + #customerProfileId = response.customerProfileId #create customer payment profile - response = create_customer_payment_profile(customerProfileId) - validate_response(response) - customerPaymentProfileId = response.customerPaymentProfileId + #response = create_customer_payment_profile(customerProfileId) + #validate_response(response) + #customerPaymentProfileId = response.customerPaymentProfileId - response = charge_customer_profile(customerProfileId, customerPaymentProfileId) - validate_response(response) + #response = charge_customer_profile(customerProfileId, customerPaymentProfileId) + #validate_response(response) - response = charge_tokenized_credit_card() - validate_response(response) + #response = charge_tokenized_credit_card() + #validate_response(response) response = credit_bank_account() validate_response(response) @@ -200,11 +200,11 @@ def validate_response(response= nil) # response = refund_transaction() # validate_response(response) - response = update_split_tender_group() - validate_response(response) + #response = update_split_tender_group() + #validate_response(response) - response = void_transaction() - validate_response(response) + #response = void_transaction() + #validate_response(response) end From abba39bab9e4b984e4871c91e355c4d21aded09d Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 12:13:20 +0530 Subject: [PATCH 18/27] testing only credit bank account and chnaged routing number to 121042882 --- PaymentTransactions/credit-bank-account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PaymentTransactions/credit-bank-account.rb b/PaymentTransactions/credit-bank-account.rb index f2742ca..d91e202 100644 --- a/PaymentTransactions/credit-bank-account.rb +++ b/PaymentTransactions/credit-bank-account.rb @@ -15,7 +15,7 @@ def credit_bank_account() request.transactionRequest = TransactionRequestType.new() request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 15 ).round(2) request.transactionRequest.payment = PaymentType.new - request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','122000661','1234567890', 'John Doe','PPD','Wells Fargo Bank NA','101') + request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','121042882','1234567890', 'John Doe','PPD','Wells Fargo Bank NA','101') request.transactionRequest.transactionType = TransactionTypeEnum::RefundTransaction response = transaction.create_transaction(request) From 7b309de7a2bead37946dc6e3cfbbadae69c56406 Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 12:18:32 +0530 Subject: [PATCH 19/27] testing only credit bank account and chnaged routing number to 125000105 --- PaymentTransactions/credit-bank-account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PaymentTransactions/credit-bank-account.rb b/PaymentTransactions/credit-bank-account.rb index d91e202..f3b2ce4 100644 --- a/PaymentTransactions/credit-bank-account.rb +++ b/PaymentTransactions/credit-bank-account.rb @@ -15,7 +15,7 @@ def credit_bank_account() request.transactionRequest = TransactionRequestType.new() request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 15 ).round(2) request.transactionRequest.payment = PaymentType.new - request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','121042882','1234567890', 'John Doe','PPD','Wells Fargo Bank NA','101') + request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','125000105','1234567890', 'John Doe','PPD','Wells Fargo Bank NA','101') request.transactionRequest.transactionType = TransactionTypeEnum::RefundTransaction response = transaction.create_transaction(request) From ecb3214a3cedd1df08588dc8c40432cc942120c1 Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 12:20:46 +0530 Subject: [PATCH 20/27] testing only credit bank account and chnaged routing number to 121042882 and acconut number to 123456789 --- PaymentTransactions/credit-bank-account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PaymentTransactions/credit-bank-account.rb b/PaymentTransactions/credit-bank-account.rb index f3b2ce4..1d7407a 100644 --- a/PaymentTransactions/credit-bank-account.rb +++ b/PaymentTransactions/credit-bank-account.rb @@ -15,7 +15,7 @@ def credit_bank_account() request.transactionRequest = TransactionRequestType.new() request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 15 ).round(2) request.transactionRequest.payment = PaymentType.new - request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','125000105','1234567890', 'John Doe','PPD','Wells Fargo Bank NA','101') + request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','121042882','123456789', 'John Doe','PPD','Wells Fargo Bank NA','101') request.transactionRequest.transactionType = TransactionTypeEnum::RefundTransaction response = transaction.create_transaction(request) From 35355772d6cbd9472ea6a885ba364c5608057e02 Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 12:31:03 +0530 Subject: [PATCH 21/27] testing only credit bank account and chnaged routing number to 122000661 and account number to random --- PaymentTransactions/credit-bank-account.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PaymentTransactions/credit-bank-account.rb b/PaymentTransactions/credit-bank-account.rb index 1d7407a..8008bac 100644 --- a/PaymentTransactions/credit-bank-account.rb +++ b/PaymentTransactions/credit-bank-account.rb @@ -15,7 +15,9 @@ def credit_bank_account() request.transactionRequest = TransactionRequestType.new() request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 15 ).round(2) request.transactionRequest.payment = PaymentType.new - request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','121042882','123456789', 'John Doe','PPD','Wells Fargo Bank NA','101') + //Generate random bank account number + randomAccountNumber= rand(100000000,9999999999); + request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','122000661',randomAccountNumber, 'John Doe','PPD','Wells Fargo Bank NA','101') request.transactionRequest.transactionType = TransactionTypeEnum::RefundTransaction response = transaction.create_transaction(request) From 13156c1540e15d23ebcdfb49607b1758637cb43b Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 12:34:47 +0530 Subject: [PATCH 22/27] fixing credit bank account --- PaymentTransactions/credit-bank-account.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PaymentTransactions/credit-bank-account.rb b/PaymentTransactions/credit-bank-account.rb index 8008bac..8c091f8 100644 --- a/PaymentTransactions/credit-bank-account.rb +++ b/PaymentTransactions/credit-bank-account.rb @@ -15,8 +15,8 @@ def credit_bank_account() request.transactionRequest = TransactionRequestType.new() request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 15 ).round(2) request.transactionRequest.payment = PaymentType.new - //Generate random bank account number - randomAccountNumber= rand(100000000,9999999999); + #Generate random bank account number + randomAccountNumber= Random.rand(100000000,9999999999); request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','122000661',randomAccountNumber, 'John Doe','PPD','Wells Fargo Bank NA','101') request.transactionRequest.transactionType = TransactionTypeEnum::RefundTransaction From 1eadfd7cb328d7cbc445e845384824391a4f8e3e Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 12:42:31 +0530 Subject: [PATCH 23/27] fixing credit bank account - 2 --- PaymentTransactions/credit-bank-account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PaymentTransactions/credit-bank-account.rb b/PaymentTransactions/credit-bank-account.rb index 8c091f8..8611f86 100644 --- a/PaymentTransactions/credit-bank-account.rb +++ b/PaymentTransactions/credit-bank-account.rb @@ -16,7 +16,7 @@ def credit_bank_account() request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 15 ).round(2) request.transactionRequest.payment = PaymentType.new #Generate random bank account number - randomAccountNumber= Random.rand(100000000,9999999999); + randomAccountNumber= Random.rand(100000000,9999999999).to_s; request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','122000661',randomAccountNumber, 'John Doe','PPD','Wells Fargo Bank NA','101') request.transactionRequest.transactionType = TransactionTypeEnum::RefundTransaction From 952a6421c930113f49bf37225847cf70b769910d Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 12:47:02 +0530 Subject: [PATCH 24/27] fixing credit bank account - 3 --- PaymentTransactions/credit-bank-account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PaymentTransactions/credit-bank-account.rb b/PaymentTransactions/credit-bank-account.rb index 8611f86..e8fb0e4 100644 --- a/PaymentTransactions/credit-bank-account.rb +++ b/PaymentTransactions/credit-bank-account.rb @@ -16,7 +16,7 @@ def credit_bank_account() request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 15 ).round(2) request.transactionRequest.payment = PaymentType.new #Generate random bank account number - randomAccountNumber= Random.rand(100000000,9999999999).to_s; + randomAccountNumber= Random.rand(100000000..9999999999).to_s; request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','122000661',randomAccountNumber, 'John Doe','PPD','Wells Fargo Bank NA','101') request.transactionRequest.transactionType = TransactionTypeEnum::RefundTransaction From 63da76ff30e7d5d65834846d54948cbd042de387 Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 12:59:01 +0530 Subject: [PATCH 25/27] fixing credit bank account - 4 --- PaymentTransactions/credit-bank-account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PaymentTransactions/credit-bank-account.rb b/PaymentTransactions/credit-bank-account.rb index e8fb0e4..8e238ac 100644 --- a/PaymentTransactions/credit-bank-account.rb +++ b/PaymentTransactions/credit-bank-account.rb @@ -17,7 +17,7 @@ def credit_bank_account() request.transactionRequest.payment = PaymentType.new #Generate random bank account number randomAccountNumber= Random.rand(100000000..9999999999).to_s; - request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','122000661',randomAccountNumber, 'John Doe','PPD','Wells Fargo Bank NA','101') + request.transactionRequest.payment.bankAccount = BankAccountType.new('checking', '122000661', "'#{randomAccountNumber}'", 'John Doe','PPD','Wells Fargo Bank NA','101') request.transactionRequest.transactionType = TransactionTypeEnum::RefundTransaction response = transaction.create_transaction(request) From c77e6372e68aded9bee245115da0a063efaa3cec Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 13:05:41 +0530 Subject: [PATCH 26/27] fixing debit bank account --- PaymentTransactions/debit-bank-account.rb | 4 +++- spec/sample_code_spec.rb | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/PaymentTransactions/debit-bank-account.rb b/PaymentTransactions/debit-bank-account.rb index 0eb3da7..e15cc45 100644 --- a/PaymentTransactions/debit-bank-account.rb +++ b/PaymentTransactions/debit-bank-account.rb @@ -15,7 +15,9 @@ def debit_bank_account() request.transactionRequest = TransactionRequestType.new() request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 15 ).round(2) request.transactionRequest.payment = PaymentType.new - request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','125000105','1234567890', 'John Doe','WEB','Wells Fargo Bank NA','101') + #Generate random bank account number + randomAccountNumber= Random.rand(100000000..9999999999).to_s; + request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','122000661',"'#{randomAccountNumber}'", 'John Doe','WEB','Wells Fargo Bank NA','101') request.transactionRequest.transactionType = TransactionTypeEnum::AuthCaptureTransaction request.transactionRequest.order = OrderType.new("invoiceNumber#{(SecureRandom.random_number*1000000).round(0)}","Order Description") diff --git a/spec/sample_code_spec.rb b/spec/sample_code_spec.rb index 1db7d7f..b11f022 100644 --- a/spec/sample_code_spec.rb +++ b/spec/sample_code_spec.rb @@ -194,8 +194,8 @@ def validate_response(response= nil) response = credit_bank_account() validate_response(response) - #response = debit_bank_account() - #validate_response(response) + response = debit_bank_account() + validate_response(response) # response = refund_transaction() # validate_response(response) From 7266e5f3cedfffe64490460b0583e657d1fa59fb Mon Sep 17 00:00:00 2001 From: Lakshmi Gangumalla Date: Tue, 28 Aug 2018 13:11:48 +0530 Subject: [PATCH 27/27] Testing everything except refund --- spec/sample_code_spec.rb | 48 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/spec/sample_code_spec.rb b/spec/sample_code_spec.rb index b11f022..9cfa3c9 100644 --- a/spec/sample_code_spec.rb +++ b/spec/sample_code_spec.rb @@ -157,39 +157,39 @@ def validate_response(response= nil) it "should be able to run all Payment Transaction sample code" do puts "START - Payment Transactions" - #response = authorize_credit_card() - #validate_response(response) + response = authorize_credit_card() + validate_response(response) - #response = capture_funds_authorized_through_another_channel() - #validate_response(response) + response = capture_funds_authorized_through_another_channel() + validate_response(response) # response = capture_only() # validate_response(response) - #response = capture_funds_authorized_through_another_channel() - #validate_response(response) + response = capture_funds_authorized_through_another_channel() + validate_response(response) - #response = capture_previously_authorized_amount() - #validate_response(response) + response = capture_previously_authorized_amount() + validate_response(response) - #response = charge_credit_card() - #validate_response(response) + response = charge_credit_card() + validate_response(response) #create customer profile - #response = create_customer_profile() - #validate_response(response) - #customerProfileId = response.customerProfileId + response = create_customer_profile() + validate_response(response) + customerProfileId = response.customerProfileId #create customer payment profile - #response = create_customer_payment_profile(customerProfileId) - #validate_response(response) - #customerPaymentProfileId = response.customerPaymentProfileId + response = create_customer_payment_profile(customerProfileId) + validate_response(response) + customerPaymentProfileId = response.customerPaymentProfileId - #response = charge_customer_profile(customerProfileId, customerPaymentProfileId) - #validate_response(response) + response = charge_customer_profile(customerProfileId, customerPaymentProfileId) + validate_response(response) - #response = charge_tokenized_credit_card() - #validate_response(response) + response = charge_tokenized_credit_card() + validate_response(response) response = credit_bank_account() validate_response(response) @@ -200,11 +200,11 @@ def validate_response(response= nil) # response = refund_transaction() # validate_response(response) - #response = update_split_tender_group() - #validate_response(response) + response = update_split_tender_group() + validate_response(response) - #response = void_transaction() - #validate_response(response) + response = void_transaction() + validate_response(response) end