YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

This transaction cannot be processed due to an invalid merchant configuration. Options
sharathmqd
#1 Posted : Monday, May 31, 2010 9:52:01 AM
Rank: Starting Member

Groups: Registered

Joined: 5/31/2010
Posts: 2
Location: Hyderabad
The Below is the code for direct Payment Details


Can any one look in to this and please process this , i am in an Urgency of completing this paypal as soon as possible ,

Please help me out


using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using com.paypal.sdk.profiles;
using com.paypal.sdk.services;
using com.paypal.sdk.services;
using log4net;
public partial class _Default : System.Web.UI.Page
{


protected void Page_Load(object sender, EventArgs e)
{
CallerServices caller = new CallerServices();
IAPIProfile profile = ProfileFactory.createSignatureAPIProfile();
profile.APIUsername = "sharat_1272537238_biz_api1.olivetech.net";// "sdk-seller_api1.sdk.com";
profile.APIPassword = "272537165";
profile.Environment = "Sandbox";
profile.Subject ="";
profile.APISignature = "ACbX.eyVY70zGLTq135LzoDU3kB0Aq.6hFoTeXbORACSr-BzDNNNew00";
caller.APIProfile = profile;
com.paypal.soap.api.DoDirectPaymentRequestDetailsType directPaymentDetails = new com.paypal.soap.api.DoDirectPaymentRequestDetailsType();

//Set Credit Card
com.paypal.soap.api.CreditCardDetailsType cc = new com.paypal.soap.api.CreditCardDetailsType();
cc.CreditCardType = com.paypal.soap.api.CreditCardTypeType.Visa;
cc.CreditCardNumber = "4252256284447492";
cc.ExpMonth=10;
cc.ExpMonthSpecified = true;
cc.ExpYear = 2015;
cc.ExpYearSpecified = true;
cc.CVV2 ="123";
//Set Credit Card.CardOwner
com.paypal.soap.api.PayerInfoType theCardOwner = new com.paypal.soap.api.PayerInfoType();
com.paypal.soap.api.PersonNameType thePayerName = new com.paypal.soap.api.PersonNameType();
thePayerName.FirstName ="John";
thePayerName.LastName ="Doe";
theCardOwner.PayerName = thePayerName;
com.paypal.soap.api.AddressType theAddress = new com.paypal.soap.api.AddressType();
theAddress.Street1 ="123 Main";
theAddress.Street2 ="Apt 23";
theAddress.CityName ="Hill Side";
theAddress.StateOrProvince ="FL";
theAddress.PostalCode ="32550";
theAddress.Country = com.paypal.soap.api.CountryCodeType.US;
theCardOwner.Address = theAddress;
cc.CardOwner = theCardOwner;
directPaymentDetails.CreditCard = cc;
//Set Order Total
com.paypal.soap.api.BasicAmountType temp = new com.paypal.soap.api.BasicAmountType();
com.paypal.soap.api.PaymentDetailsType payDetailType = new com.paypal.soap.api.PaymentDetailsType();
temp.Value ="10.25";
temp.currencyID = com.paypal.soap.api.CurrencyCodeType.USD;payDetailType.OrderTotal = temp;

directPaymentDetails.PaymentDetails = payDetailType;
//Set IP
directPaymentDetails.IPAddress ="192.168.200.195";
//Set Transaction Type
directPaymentDetails.PaymentAction = com.paypal.soap.api.PaymentActionCodeType.Sale;

//Set Request
com.paypal.soap.api.DoDirectPaymentRequestType request = new com.paypal.soap.api.DoDirectPaymentRequestType();

//Set Payment Detail
request.DoDirectPaymentRequestDetails = directPaymentDetails;

request.DoDirectPaymentRequestDetails.CreditCard.CardOwner.Address.CountrySpecified =true;
com.paypal.soap.api.DoDirectPaymentResponseType response = (com.paypal.soap.api.DoDirectPaymentResponseType)caller.Call("DoDirectPayment", request);
Response.Write("response=" + response.Ack);

Response.Write("<BR>response=" + response.Errors[0].LongMessage.ToString() + " - " + response.Errors[0].ErrorCode.ToString());
}
Sponsor  
 
CorradoDev.com
#2 Posted : Tuesday, June 01, 2010 3:05:57 AM
Rank: Starting Member

Groups: Registered

Joined: 5/19/2010
Posts: 10
Location: Omaha, Ne
This error generally means you do not have pro turned on. Create an account following the directions here:
https://www.x.com/docs/DOC-1603
Also if you run into any troubles create a ticket to paypal.com/mts as I heard they are having issues with sandbox account creation.
Send me a donation if you thought I was helpful:
Donation
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.273 seconds.