Re: [WebDNA] PayPal Express Checkout

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 102330
interpreted = N
texte = I have a number of stores using PPExpress. Once you understand what it is doing and why, it is pretty easy to get your head around, the hardest thing is getting the TCPCONNECT/TCPSEND to work. And the guys at PP don't seem to have any idea of which servers to point to. I did a lot of development work with a couple of their integration people here in Sydney and now have a pretty bullet proof modular system. Yes, all done in WebDNA. Here is my code for making the connection (SetExpressCheckout.inc): ################################################################### [!]================================= [/!] [!] Send Set Express Checkout call to PP and [/!] [!] then redirect to PP with token [/!] [!] Return to return.html with token and order # [/!] [!] Cancel to cancel.html with token and order # [/!] [!] Extract Customer delivery details if required [/!] [!]================================= [/!] [!]===== SetExpressCheckout =====[/!] [TEXT]content=[!] [/!]&USER=[URL][Lookup db=^paypal/ paypal.db&Lookinfield=PREF&returnfield=PREFVALUE&value=[API- CODE]APIUSERNAME][/URL][!] [/!]&PWD=[URL][Lookup db=^paypal/ paypal.db&Lookinfield=PREF&returnfield=PREFVALUE&value=[API- CODE]APIPASSWORD][/URL][!] [/!]&VERSION=[URL][Lookup db=^paypal/ paypal.db&Lookinfield=PREF&returnfield=PREFVALUE&value=[API- CODE]APIVERSION][/URL][!] [/!]&SIGNATURE=[URL][Lookup db=^paypal/ paypal.db&Lookinfield=PREF&returnfield=PREFVALUE&value=[API- CODE]APISIGNATURE][/URL][!] [/!]&METHOD=[URL]SetExpressCheckout[/URL][!] [/!]&PAYMENTACTION=[URL]SALE[/URL][!] SALE, AUTHORIZATION, ORDER [/!]&AMT=[URL][THISAMOUNT][/URL][!] [/!]&CURRENCYCODE=[URL][ThisCurrency][/URL][!] [/!]&SOLUTIONTYPE=[URL]Sole[/URL][!] [/!]&RETURNURL=[URL][SiteReturnURL][/URL][!] [/!]&CANCELURL=[URL][SiteCancelURL][/URL][!] [/!]&INVNUM=[URL][ThisOrder][/URL][!] [/!]&PAGESTYLE=[URL][ThisBrand][/URL][!] [/!][/TEXT] [!]===== Make Connection =====[/!] [text muti=F]paypal_result=[tcpconnect host=[Lookup db=^paypal/ paypal.db&Lookinfield=PREF&returnfield=PREFVALUE&value=[API- CODE]APIURL]&port=443&ssl=T][!] [/!][tcpsend skipheader=T]POST /nvp HTTP/1.0[UnURL]%0D%0A[/UnURL][!] [/!]USER-AGENT: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) [UnURL]%0D%0A[/UnURL][!] [/!]Content-type: text/namevalue[UnURL]%0D%0A[/UnURL][!] [/!]Content-Length: [CountChars][content][/CountChars][UnURL]%0D%0A[/ UnURL][!] [/!]Content-type: text/namevalue[UnURL]%0D%0A[/UnURL][!] [/!][UnURL]%0D%0A[/UnURL][!] [/!][content][UnURL]%0D%0A[/UnURL][!] [/!][/TCPSend][!] [/!][/tcpconnect][/text] [!] -------------- This creates multi text variables -------------- [/!] [TEXT multi=T]PayPal_result02=0&[PayPal_Result][/TEXT] [If ("[ACK]"^"success")] [!] -------------- PAYPAL SUCCESS -------------- [/!] [Then] [Redirect https://[Lookup db=^paypal/ paypal.db&Lookinfield=PREF&returnfield=PREFVALUE&value=[API- CODE]PAYPALURL]/cgi-bin/webscr?cmd=_express-checkout&token=[UnURL] [Token][/UnURL]] [/Then] [!] -------------- PAYPAL FAILURE -------------- [/!] [Else][Include file=^paypal/failure.inc][/Else] [/If] ################################################################### URL's DEVELOPMENTAPIURLapi-3t.sandbox.paypal.com LIVEAPIURLapi-3t.paypal.com Hopefully this will get you started, contact me off list and I will dig out the full set of code for you. Regards Stuart Tremain IDFK Web Developments AUSTRALIA webdna@idfk.com.au On 02/04/2009, at 11:35 AM, World Wide Art wrote: > Has anyone integrated PayPal Express Checkout with WebDNA? Did you > have to use java or another architecture? My guess is that WebDNA > can do it, I am just not sure how. > > I am having problems calling the API and getting the response from > the API. > > Thanks, > d. > > World Wide Art, Art Gallery and Custom Framing > questions@world-wide-art.com > Disney Preferred Animation Art Gallery > Specializing in Limited Editions by Today's Top Artists and Custom > Conservation Framing. > http://www.world-wide-art.com > 1-800-518-8453 or 1-510-538-8453 > > > Associated Messages, from the most recent to the oldest:

    
  1. [WebDNA] PayPal Express Checkout for WebDNA (Stuart Tremain 2009)
  2. Re: [WebDNA] PayPal Express Checkout (World Wide Art 2009)
  3. Re: [WebDNA] PayPal Express Checkout (Stuart Tremain 2009)
  4. [WebDNA] PayPal Express Checkout (World Wide Art 2009)
I have a number of stores using PPExpress. Once you understand what it is doing and why, it is pretty easy to get your head around, the hardest thing is getting the TCPCONNECT/TCPSEND to work. And the guys at PP don't seem to have any idea of which servers to point to. I did a lot of development work with a couple of their integration people here in Sydney and now have a pretty bullet proof modular system. Yes, all done in WebDNA. Here is my code for making the connection (SetExpressCheckout.inc): ################################################################### [!]================================= [/!] [!] Send Set Express Checkout call to PP and [/!] [!] then redirect to PP with token [/!] [!] Return to return.html with token and order # [/!] [!] Cancel to cancel.html with token and order # [/!] [!] Extract Customer delivery details if required [/!] [!]================================= [/!] [!]===== SetExpressCheckout =====[/!] [text]content=[!] [/!]&USER=[url][Lookup db=^paypal/ paypal.db&Lookinfield=PREF&returnfield=PREFVALUE&value=[API- CODE]APIUSERNAME][/URL][!] [/!]&PWD=[url][Lookup db=^paypal/ paypal.db&Lookinfield=PREF&returnfield=PREFVALUE&value=[API- CODE]APIPASSWORD][/URL][!] [/!]&VERSION=[url][Lookup db=^paypal/ paypal.db&Lookinfield=PREF&returnfield=PREFVALUE&value=[API- CODE]APIVERSION][/URL][!] [/!]&SIGNATURE=[url][Lookup db=^paypal/ paypal.db&Lookinfield=PREF&returnfield=PREFVALUE&value=[API- CODE]APISIGNATURE][/URL][!] [/!]&METHOD=[url]SetExpressCheckout[/URL][!] [/!]&PAYMENTACTION=[url]SALE[/URL][!] SALE, AUTHORIZATION, ORDER [/!]&AMT=[url][THISAMOUNT][/URL][!] [/!]&CURRENCYCODE=[url][ThisCurrency][/URL][!] [/!]&SOLUTIONTYPE=[url]Sole[/URL][!] [/!]&RETURNURL=[url][SiteReturnURL][/URL][!] [/!]&CANCELURL=[url][SiteCancelURL][/URL][!] [/!]&INVNUM=[url][ThisOrder][/URL][!] [/!]&PAGESTYLE=[url][ThisBrand][/URL][!] [/!][/TEXT] [!]===== Make Connection =====[/!] [text muti=F]paypal_result=[tcpconnect host=[Lookup db=^paypal/ paypal.db&Lookinfield=PREF&returnfield=PREFVALUE&value=[API- CODE]APIURL]&port=443&ssl=T][!] [/!][tcpsend skipheader=T]POST /nvp HTTP/1.0[unurl]%0D%0A[/UnURL][!] [/!]USER-AGENT: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) [unurl]%0D%0A[/UnURL][!] [/!]Content-type: text/namevalue[unurl]%0D%0A[/UnURL][!] [/!]Content-Length: [countchars][content][/CountChars][unurl]%0D%0A[/ UnURL][!] [/!]Content-type: text/namevalue[unurl]%0D%0A[/UnURL][!] [/!][unurl]%0D%0A[/UnURL][!] [/!][content][unurl]%0D%0A[/UnURL][!] [/!][/TCPSend][!] [/!][/tcpconnect][/text] [!] -------------- This creates multi text variables -------------- [/!] [TEXT multi=T]PayPal_result02=0&[PayPal_Result][/TEXT] [If ("[ACK]"^"success")] [!] -------------- PAYPAL SUCCESS -------------- [/!] [Then] [Redirect https://[Lookup db=^paypal/ paypal.db&Lookinfield=PREF&returnfield=PREFVALUE&value=[API- CODE]PAYPALURL]/cgi-bin/webscr?cmd=_express-checkout&token=[unurl] [Token][/UnURL]] [/Then] [!] -------------- PAYPAL FAILURE -------------- [/!] [Else][Include file=^paypal/failure.inc][/Else] [/If] ################################################################### URL's DEVELOPMENTAPIURLapi-3t.sandbox.paypal.com LIVEAPIURLapi-3t.paypal.com Hopefully this will get you started, contact me off list and I will dig out the full set of code for you. Regards Stuart Tremain IDFK Web Developments AUSTRALIA webdna@idfk.com.au On 02/04/2009, at 11:35 AM, World Wide Art wrote: > Has anyone integrated PayPal Express Checkout with WebDNA? Did you > have to use java or another architecture? My guess is that WebDNA > can do it, I am just not sure how. > > I am having problems calling the API and getting the response from > the API. > > Thanks, > d. > > World Wide Art, Art Gallery and Custom Framing > questions@world-wide-art.com > Disney Preferred Animation Art Gallery > Specializing in Limited Editions by Today's Top Artists and Custom > Conservation Framing. > http://www.world-wide-art.com > 1-800-518-8453 or 1-510-538-8453 > > > Stuart Tremain

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

[protect admin] (1997) Using Plug-In while running 1.6.1 (1997) Running 2 two WebCatalog.acgi's (1996) Re:no template caching (1997) Forbidden CGI Error (1997) [WebDNA] anyone set up webdna 7 with virtual hosts on mac? (2012) How to Sort Summ data ? (1997) WebCatalog Mac and cgi-bin (WebSTAR 2.0) (1997) Old $ commands and migration (2004) Quick ShowIf question (1997) Shipcost formula (2004) Deleting Orders (1998) Fun with dates (1997) Country & Ship-to address & other fields ? (1997) The IBC root beer has arrived! (1997) It finally happened ... (2003) WebDNA Grep help wanted (2004) [WriteFile] problems (1997) Fwd: Problems with Webcatalog Plug-in (1997) Webcat Manual and TeaRoom Examples Uses Different Examples. (1997)