我使用所有有效输入调用了 WebSitePayment Pro doDirectPayment API,但在 API 响应中我得到以下错误
“由于商家配置无效,无法处理此交易。”
为了获得更多帮助,我在这里写下了我的应用程序代码
PayPalResponse oResponse = new PayPalResponse ( );
Profile oProfile = new Profile ( );
RequestDetail oRequestDetail = new RequestDetail ( );
DoDirectPayment oDoPayment = new DoDirectPayment ( );
string Responsestring = "";
oProfile.APIUsername = ConfigurationManager.AppSettings["apiusername"];
oProfile.APIPassword = ConfigurationManager.AppSettings["apipassword"];
oProfile.APISignature = ConfigurationManager.AppSettings["apisignature"];
oProfile.Environment = ConfigurationManager.AppSettings["environment"];
oRequestDetail.IPAddress = Request.ServerVariables["LOCAL_ADDR"].ToString ( );
oRequestDetail.MerchantSessionId = Session.SessionID;
oResponse = oDoPayment.DoDirectPaymentCode ( "1.0", txtlastname.Text, txtFirstname.Text, txtaddress1.Text , txtaddress2.Text , txtCity.Text ,txtState.Text ,txtzipcode.Text,
"Visa", txtcardno.Text,txtcvv2.Text, Convert.ToInt32(txtExpMonth.Text), Convert.ToInt32(txtExpYear.Text), PaymentActionCodeType.Sale, oProfile, "USA", CountryCodeType.US, CurrencyCodeType.USD, oRequestDetail );
if (oResponse.ErrorLog.Count > 0)
{
foreach (KeyValuePair<string, string> o in oResponse.ErrorLog)
{
Response.Write ( o.Value.ToString ( ) + "<br/>" );
}
}
任何人都可以帮我解决这个问题吗,此代码适用于 Sandbox,但不适用于 Live 环境。我已完成企业帐户的所有计费协议。