-
Notifications
You must be signed in to change notification settings - Fork 134
Description
I have the same implementation as referred and also pass on CustomerDataType and Order Type. If i use Credit Card then i get accepted in live site, but the "DebitBankAccount" returns NULL response (The response object is NULL).
Customer Info has emailID and UserID which is an INT passed as string
Order Info has invoice number which is "12345-67890" and Description"
I tried in the sandbox URL and have the same problem.
If i run it from my dev server i dont have this issue and works like a charm.
Also, the command sample application (sample-code-csharp-master) from Authorize.net downloaded from githhub runs well in the same PROD server where web fails.
My Server is Windows 2012 R2
Any help?
Here is the Debit Bank Code:
#region Direct Debit - Bank Payment
//accType = null;
var bankAccount = new bankAccountType
{
accountNumber = TextBoxAccountNumber.Text,
routingNumber = TextBoxRTN.Text,
echeckType = echeckTypeEnum.WEB, // change based on how you take the payment (web, telephone, etc)
nameOnAccount = TextBoxBankName.Text,
accountType = GetSelectedAccountType()
};
//standard api call to retrieve response
var paymentType = new paymentType { Item = bankAccount };
customerDataType customerInfo;
orderType orderInfo;
GetCustomerAndOrderInfo(out customerInfo, out orderInfo);
transactionRequest = new transactionRequestType
{
transactionType = transactionTypeEnum.authCaptureTransaction.ToString(), // refund type
payment = paymentType,
amount = ccPaymentDetails.Amount,
customer = customerInfo,
order = orderInfo
};
#endregion
}
request = new createTransactionRequest { transactionRequest = transactionRequest };
// instantiate the contoller that will call the service
var controller = new createTransactionController(request);
controller.Execute();
// get the response from the service (errors contained if any)
var response = controller.GetApiResponse();
if (response != null && response.messages.resultCode == messageTypeEnum.Ok)
{
if (response.transactionResponse != null)
{...
}
}
else if (response != null)
{
string message = "Transaction Error : " + response.messages.message[0].code + " " + response.messages.message[0].text;
// Do something Here
}
else { Log.Info("Authorize.net Response Message is null", true); }
It always goes to else when i use DebitBank
Note: Same code for CC works like a charm.