What you are doing looks correct.


The error is perhaps indicating that the PAYMENTREQUEST_0_AMT isn’t present. 
Try moving that element up from the end, or add something after it just to make 
sure that the last element isn’t being lost or corrupted.



Also, verify that you aren’t missing any required elements (eg. 
PAYMENTREQUEST_0_CURRENCYCODE, PAYMENTREQUEST_0_ITEMAMT)



There is nothing special needed in the header. The production code I have uses 
@URL with NVP. This was written before Web Call was implemented and Web Call is 
the preferred method going forward.



If you can’t get it to work, email me the TAF that you have to support@. You 
can strip any sensitive data, I’m not going to POST to PayPal, but a utility I 
have that will show me the content of the post body.



Robert



From: Fogelson, Steve [mailto:[email protected]]
Sent: Monday, September 22, 2014 10:58 PM
To: [email protected]
Subject: RE: TeraScript-Talk: PayPal Express Checkout



Hi Robert,



I have been working with PayPal to try to get this to work, but am getting an 
error as follows:




TIMESTAMP

2014-09-23T01:57:25Z


CORRELATIONID

46e76ed9e0f07


ACK

Failure


VERSION

98.0


BUILD

12932421


L_ERRORCODE0

10400


L_SHORTMESSAGE0

Transaction refused because of an invalid argument. See additional error 
messages for details.


L_LONGMESSAGE0

Order total is missing.


L_SEVERITYCODE0

Error



The NVP that I am submitting through a Web Call are below. The PostData is a 
two column Argument Array indicated below. The Method is POST. I don’t have 
anything in the Header tab.




USER

xxxxxxxxxxxxxxx


PWD

xxxxxxxxxxxxxxx


SIGNATURE

xxxxxxxxxxxxxxx


METHOD

SetExpressCheckout


VERSION

98.0


RETURNURL

https%3A%2F%2Fwww%2Exxxxxxx%2Ecom%2FAdmin%2Fpaypal%2Etaf%3F%5Ffunction%3DGetExpressCheckoutDetails


CANCELURL

http%3A%2F%2Fwww%2Exxxxxxx%2Ecom%2FShopper%2FBasket%2Etaf%3F%5Faction%3Dshow


PAYMENTREQUEST_0_PAYMENTACTION

Sale


PAYMENTREQUEST_0_AMT

129.99



The initial NVPs I submitted had much more detail, but I have reduced it down 
to the minimum required submission to try to get this to work.



I was able to execute successfully by submitting the NVP request via a browser 
and did receive a token from PayPal.



Was Ben able to get NVP to work with the Web Call action?



Do you know if anything is needed in the header tab?



Or do I need to use @URL?



Or do I need to use XML instead of NVP?



Thanks



Steve



From: Robert Shubert [mailto:[email protected]]
Sent: Friday, September 19, 2014 12:41 PM
To: [email protected] <mailto:[email protected]>
Subject: RE: TeraScript-Talk: PayPal Express Checkout



Steve,



You are correct. You use @URL or Webcall to begin the transaction with PayPal.



They return a URL to you, which you redirect the user to by setting the 
httpheader and using a 302 redirect.



You don’t need to include the @USERREFERENCE as long as the return url you 
provide to PayPal is at the same domain, this is because the cookie should 
still be active in the browser session. Including the @USERREFERENCEARGUMENT in 
the url won’t hurt, however.



The most complex part of the process is building up the name value pairs and 
parsing the returns from paypal. Since some values are URLs, they need to be 
properly @URLENCODEd.



PayPal offers a good sandbox environment to test the complete cycle, which is 
helpful.



I know Ben Johansen is knowledgeable about this process if you are considering 
hiring a consultant.



Robert



From: Fogelson, Steve [mailto:[email protected]]
Sent: Thursday, September 18, 2014 11:25 PM
To: [email protected] <mailto:[email protected]>
Subject: TeraScript-Talk: PayPal Express Checkout



Has anyone put together a TeraScript app for PayPal Express Checkout?



It appears that PayPal requires a direct url to their site with customer info 
including total purchase amount. The customer logs in to PayPal and approves 
purchase and payment.



Then PayPal redirects back to the originating site.



Wondering about the logic to accomplish this in TeraScript.



Assuming I would use the Web Call action to start the transaction with PayPal, 
but not sure about the redirect back from PayPal. It may take the customer a 
while to do their business on PayPal.



Should the PayPal redirect url include the <@USERREFERENCE>?



Thanks for any insight you can provide to accomplish this.



Thanks



Steve Fogelson

Internet Commerce Solutions



  _____

To unsubscribe from this list, please send an email to  
<mailto:[email protected]> [email protected] with "unsubscribe 
terascript-talk" in the body.



  _____

To unsubscribe from this list, please send an email to [email protected] 
<mailto:[email protected]>  with "unsubscribe terascript-talk" in the 
body.



  _____

To unsubscribe from this list, please send an email to [email protected] 
<mailto:[email protected]>  with "unsubscribe terascript-talk" in the 
body.




----------------------------------------

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.

Reply via email to