Skip to content

Commit 455529b

Browse files
author
akankari
committed
Passing Random amount in debit bank account
1 parent d59746c commit 455529b

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

‎PaymentTransactions/DebitBankAccount.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace net.authorize.sample
1010
{
1111
public class DebitBankAccount
1212
{
13-
public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey)
13+
public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey, decimal Amount)
1414
{
1515
Console.WriteLine("Debit Bank Account Transaction");
1616

@@ -39,7 +39,7 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey)
3939
{
4040
transactionType = transactionTypeEnum.authCaptureTransaction.ToString(), // refund type
4141
payment = paymentType,
42-
amount = 126.44m
42+
amount = Amount
4343
};
4444

4545
var request = new createTransactionRequest { transactionRequest = transactionRequest };

‎SampleCode.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ private static void RunMethod(String methodName)
231231
VoidTransaction.Run(apiLoginId, transactionKey, transactionId);
232232
break;
233233
case "DebitBankAccount":
234-
DebitBankAccount.Run(apiLoginId, transactionKey);
234+
DebitBankAccount.Run(apiLoginId, transactionKey, amount);
235235
break;
236236
case "CreditBankAccount":
237237
CreditBankAccount.Run(apiLoginId, transactionKey, transactionId);

‎SampleCodeTest/SampleCodeList.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ DecryptVisaCheckoutData 0 1
88
CreateVisaCheckoutTransaction 0 0
99
CaptureFundsAuthorizedThroughAnotherChannel 1 1
1010
AuthorizeCreditCard 1 1
11-
DebitBankAccount 0 1
11+
DebitBankAccount 1 1
1212
ChargeTokenizedCreditCard 0 0
1313
PayPalAuthorizeOnly 0 1
1414
GetListOfSubscriptions 0 1

‎SampleCodeTest/TestRunner.cs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ public ANetApiResponse TestCaptureFundsAuthorizedThroughAnotherChannel()
118118
return CaptureFundsAuthorizedThroughAnotherChannel.Run(apiLoginId, transactionKey, GetAmount());
119119
}
120120

121+
public ANetApiResponse TestDebitBankAccount()
122+
{
123+
return DebitBankAccount.Run(apiLoginId, transactionKey, GetAmount());
124+
}
125+
121126
public ANetApiResponse TestUpdateCustomerShippingAddress()
122127
{
123128
var response = (createCustomerProfileResponse)CreateCustomerProfile.Run(apiLoginId, transactionKey, GetEmail());

0 commit comments

Comments
 (0)