NetTalk Central

Author Topic: PayPal Integration?  (Read 7330 times)

bekeland

  • Newbie
  • *
  • Posts: 37
    • View Profile
PayPal Integration?
« on: November 01, 2007, 09:16:21 AM »
I'm working a small shopping cart NetTalk web server app.  I now need to pass the minimal order info to PayPal to complete the transaction.  Is there any NetTalk examples of how this is done?  It looks like I have to hand off to PayPal, get either a success or cancel response back from PayPal, then on success, confirm the order with the customer, and one last time to PayPal to complete the order.  Any help would be appreciated.  Thanks.

Brian Ekeland

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: PayPal Integration?
« Reply #1 on: November 01, 2007, 10:17:07 PM »
Hi Brian,

I would be keen to discuss this with you offline - please email me
bruce at capesoft dot com

Cheers
Bruce

zolinovak

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • Email
Re: PayPal Integration?
« Reply #2 on: November 02, 2007, 06:36:17 AM »
Hi Bruce!

Please share the solution. I struggling with the same issue with the last couple months!

Thanks

Zoltan Novak

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Re: PayPal Integration?
« Reply #3 on: August 19, 2008, 04:55:39 PM »
Sorry to revive this ancient thread, but I'm also trying to do a PayPal integration. My question centers around the return URL after the user has paid and returns back to the order.

I'm using a simple PP button created using the form method, not a link. Should I include a session ID as part of the returning URL? I'm having trouble getting my head around this issue.

My other area of concern is that when I pass the PP form my return URL, I'm using this code:

p_web.SetSessionValue('ppreturnpage','http://216.218.174.155:89/listorders?<!-- Net:s:SID-->&msg=Thank&%20you%20for%20your%20order!')
(that's not my actual IP BTW... for security reasons)

I'm trying to understand the difference in NTW FAQ 14 that also talks about using <!-- Net:s:SessionID>. It seems like a strange formation. That aside, what is being sent to PP is not the actual Session ID but rather the "<!-- Net:s:SID-->" tag. Any suggestions on how to fix this or whether I even need to send the SID?
« Last Edit: August 19, 2008, 04:57:25 PM by Mike Grigsby »
Mike Grigsby
Credify Systems
Central Oregon, USA

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: PayPal Integration?
« Reply #4 on: August 20, 2008, 01:11:25 AM »
Hi Mike,

as far as I know Brian did get it all working, but unfortunately it's not the easiest example to share because it contains passwords etc which are unique to him. However I will try and strip that out, and then make the example available as a "non working" example - ie you'd need to add your own access information to make it work.

regarding the URL, yes, definitely I would include the session value. However since you are generating the URL directly, you can include the sessionID as-is in the generation. ie

p_web.SetSessionValue('ppreturnpage','http://216.218.174.155:89/listorders?SessionID='&p_web.SessionID&'&msg=Thank&%20you%20for%20your%20order!')

Cheers
Bruce

bekeland

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: PayPal Integration?
« Reply #5 on: August 26, 2008, 11:29:13 AM »
Mike,

I did get the PayPal integration working, but it sounds like you are doing the single button method.  I used the ExpressCheckout for the customers with a PayPal account, and DoDirectPayment with our own secure pages for those without.  So this may not help, but below is what my SetExpressCheckout api call looks like, with the return url in it. 

Brian

        loc:poststr = 'USER=' & clip(glo:apiuser) & |
                      '&PWD=' & clip(glo:apipass) & |
                      '&SIGNATURE=' & clip(glo:apisig) & |
                      '&VERSION=2.3' & |
                      '&PAYMENTACTION=Authorization' & |
                      '&AMT=' & clip(left(format(p_web.GetSessionValue('CartTotalNum'),@n_12.2))) & |
                      '&RETURNURL=http://www.aucsupply.com/ppReturnForm?SessionId=' & p_web.SessionID & |
                      '&CANCELURL=http://www.aucsupply.com/FramePage?SessionId=' & p_web.SessionID & |
                      '&METHOD=SetExpressCheckout'

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Re: PayPal Integration?
« Reply #6 on: August 26, 2008, 11:44:44 AM »
Thanks Brian, I got it working. It was that obscure session function I was missing. MikeG
Mike Grigsby
Credify Systems
Central Oregon, USA