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

Direct Payment With ASP.NET Options
safdarsatti
#1 Posted : Friday, August 26, 2005 12:23:12 PM
Rank: Starting Member

Groups: Registered

Joined: 8/12/2005
Posts: 2
Location: ,
Hello All, I am working with Payapl API and search transaction example given in PP_SDK_NET.pdf is working fine using ASP.net. But when i post information using following code getting failure message with following values. EWPprofile.CertificateFile="C:\\my.pem"; or EWPprofile.CertificateFile="C:\\my.cer"; Message Operation Ack: Failure If some one have information or some one have working code please email me at sh_satti@yahoo.com or replay in forum. caller = new CallerServices(); IAPIProfile profile = new DefaultAPIProfile(); profile.APIUsername = "safdarsatti_api3.hotmail.com"; profile.APIPassword = "12345678"; profile.Environment = "sandbox"; profile.Subject = ""; caller.APIProfile = profile; EWPServices EWPcaller = new EWPServices(); IEWPProfile EWPprofile = new DefaultEWPProfile(); EWPprofile.CertificateFile="C:\\my.pem"; EWPprofile.PayPalCertificateFile="C:\\cert_key_pem.txt"; EWPprofile.PrivateKey="C:\\my.pem"; EWPprofile.PrivateKeyPassword="12345678"; EWPprofile.Url="https://api.sandbox.paypal.com/2.0/"; EWPcaller.EWPProfile=EWPprofile; DoDirectPaymentRequestDetailsType directPaymentDetails = new DoDirectPaymentRequestDetailsType(); //Set Credit Card CreditCardDetailsType cc = new CreditCardDetailsType(); cc.CreditCardType=CreditCardTypeType.Visa ; cc.CreditCardNumber="4153209961756602"; cc.ExpMonth=01; cc.ExpYear=2006; cc.CVV2="000"; //Set Credit Card.CardOwner PayerInfoType theCardOwner= new PayerInfoType(); PersonNameType thePayerName = new PersonNameType(); thePayerName.FirstName="Safdar"; thePayerName.LastName="Hussain"; theCardOwner.PayerName=thePayerName; com.paypal.soap.api.AddressType theAddress = new AddressType(); theAddress.Street1 ="123 Main"; theAddress.Street2 ="Apt 23"; theAddress.CityName ="Hill Side"; theAddress.StateOrProvince ="FL"; theAddress.PostalCode ="32550"; theAddress.Country =CountryCodeType.US; theCardOwner.Address=theAddress; cc.CardOwner=theCardOwner; directPaymentDetails.CreditCard=cc; //Set Order Total BasicAmountType temp = new BasicAmountType(); PaymentDetailsType payDetailType= new PaymentDetailsType(); temp.Value = "118.25" ; temp.currencyID= CurrencyCodeType.USD; payDetailType.OrderTotal=temp; directPaymentDetails.PaymentDetails=payDetailType; //Set IP directPaymentDetails.IPAddress="203.215.172.179"; //Set Transaction Type directPaymentDetails.PaymentAction=PaymentActionCodeType.Sale; //Set Request DoDirectPaymentRequestType request=new DoDirectPaymentRequestType(); //Set Payment Detail request.DoDirectPaymentRequestDetails=directPaymentDetails; DoDirectPaymentResponseType response=(DoDirectPaymentResponseType) caller.Call("DoDirectPayment",request); Response.Write("Operation Ack: " + response.Ack+"<br>"); //Response.Write("Error : " + response.Errors.ToString()+"<br>"); //Response.Write("Amount : " + response.Amount.Value.ToString()+"<br>");
Sponsor  
 
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.143 seconds.