I too using DoDirectPayment method of paypal.Previously it was working fine but now without any change in my code it throwing an error saying that There's an error with this transaction. Please enter a complete billing address. and error code
is 10561..
praveendev
Member
2 Points
1 Post
Paypal DoDirectPayment Method Implementation..help required
Jan 22, 2013 05:31 AM|LINK
Split off from http://forums.asp.net/t/1732652.aspx/1?Paypal+DoDirectPayment+Method+Implementation+help+required. Please don't necropost.
Hi..
I too using DoDirectPayment method of paypal.Previously it was working fine but now without any change in my code it throwing an error saying that There's an error with this transaction. Please enter a complete billing address. and error code is 10561..
Below is my web config setting:
<add key="PaypalAPIUserName" value="caller_1358834311_biz_api1.hotmail.com"/>
<add key="PaypalAPIPassword" value="1358834331"/>
<add key="PaypalAPISignature" value="A8z1lDTmJCIvdTa4vtii-7cOrJwHAjENbf-PdYo-7QeKFxDQ6OGa8.Ed"/>
and my code behind is:
string CCExp = txtAuthCCEx.Text;
string CCNumber = txtAuthCCNumber.Text;
string TranAmount = txtAuthAmount.Text;
Int32 Month = Convert.ToInt32(CCExp.Substring(0, 2));
Int32 Year = Convert.ToInt32(CCExp.Substring(3, 4));
CallerServices caller = new CallerServices();
IAPIProfile profile = ProfileFactory.createSignatureAPIProfile();
profile.APIUsername = System.Configuration.ConfigurationManager.AppSettings["PaypalAPIUserName"];
profile.APIPassword = System.Configuration.ConfigurationManager.AppSettings["PaypalAPIPassword"];
profile.APISignature = System.Configuration.ConfigurationManager.AppSettings["PaypalAPISignature"];
profile.Environment = "sandbox";
caller.APIProfile = profile;
DoDirectPaymentRequestType req = new DoDirectPaymentRequestType();
req.Version = "56.0";
req.DoDirectPaymentRequestDetails = new DoDirectPaymentRequestDetailsType();
IPAddress[] localIPadd = Dns.GetHostAddresses(Dns.GetHostName());
string ll = Dns.GetHostName();
req.DoDirectPaymentRequestDetails.PaymentAction = PaymentActionCodeType.Sale;
req.DoDirectPaymentRequestDetails.CreditCard = new CreditCardDetailsType();
req.DoDirectPaymentRequestDetails.CreditCard.CreditCardNumber = CCNumber;
req.DoDirectPaymentRequestDetails.CreditCard.ExpMonth = Month;
req.DoDirectPaymentRequestDetails.CreditCard.ExpYear = Year;
req.DoDirectPaymentRequestDetails.CreditCard.ExpMonthSpecified = true;
req.DoDirectPaymentRequestDetails.CreditCard.ExpYearSpecified = true;
req.DoDirectPaymentRequestDetails.PaymentDetails = new PaymentDetailsType();
req.DoDirectPaymentRequestDetails.PaymentDetails.OrderTotal = new BasicAmountType();
req.DoDirectPaymentRequestDetails.PaymentDetails.OrderTotal.currencyID = CurrencyCodeType.USD;
req.DoDirectPaymentRequestDetails.PaymentDetails.OrderTotal.Value = TranAmount;
req.DoDirectPaymentRequestDetails.PaymentDetails.ShipToAddress = new AddressType();
DoDirectPaymentResponseType res = new DoDirectPaymentResponseType();
res = (DoDirectPaymentResponseType)caller.Call("DoDirectPayment", req);
here i am getting my DoDirectPaymentResponseType as failure..
Please suggest me what to do next??????