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:

OT - Javascript anyone? (2004) pc (1997) Renaming users local files with WebDNA based solution (1969) WebCommerce: Folder organization ? (1997) Sorting Numbers (1997) Country & Ship-to address & other fields ? (1997) Search all Fields in a db (1997) database size? (1997) WebCat2 - Getting to the browser's username/password data (1997) Emailer problems solved (1997) NT or Mac (1998) [TaxableTotal] - not working with AOL and IE (1997) Webcat/Webmerchant (1998) Almost a there but..bye bye NetCloak (1997) method of payment (1997) carriage returns in data (1997) MacAuthorize order data fields WAS:How To question... (1997) Anyone using [sendmail] for HTML encoded mail? (2000) Purchased cart being overwritten (1997) Formulas.db + Users.db (1997)