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:

WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997) is there a global includes directory? (1998) Country & Ship-to address & other fields ? (1997) upgrading (1997) (long) Support (was wo search help) (1999) WebCat2b12 CGI Mac -- Problems propagating the cart through frames...still (1997) backup dbs (2005) unable to launch acgi in WebCat (1997) TCPConnect / Current Temperature (2004) Shhh... (2006) Multiple serial numbers (1997) [WebDNA] Adding bcrypt as a encryption / hashing option (2017) URGENT - CPU usage OSXS (2001) Claris HomePage messes up the code (1997) Email Formatting (1998) Sorting error (1997) You can't buy something twice... (1997) WebCat website for developers and hosters (2001) RE: How much ram??? (1997) [WebDNA] Serial numbers and pricing for WebDNA 7.0 (2011)