tags:

views:

307

answers:

1

I had called WebSitePayment Pro doDirectPayment API with all valid inputs but in API Response I get below error

"This transaction cannot be processed due to an invalid merchant configuration."

for more help i wrote down my application code here

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/>" );
    }
}

can any body help me to resolve this issue,this code is work with Sandbox but don't work with Live environment. I have complete all billing agreement for business account.

A: 
Dave