Jump to content



Latest News: (loading..)

- - - - -

Paypal integration

paypal

  • Please log in to reply
9 replies to this topic

#1   AndrewRavenwood

AndrewRavenwood
  • Members
  • 54 posts
  • Real Name:Andrew
  • Gender:Male

Posted 11 June 2012 - 09:57 AM

I am at the stage where I need to add Paypal to the site that I have been working on, creating the API credentials is rather straightforward and I can send a customer to Paypal fine but I don't want the process to end there.

I have three questions that I hope others here will have an answer for.

1) Is there a good online guide/documentation detailing Paypal integration?
2) How do you properly enable sandbox mode in OSCom as whenever I try this in the Paypal module I encounter errors during checkout.
3) After completing the transaction I would like the customer to return to the website so that
a: They have a more complete user-experience
    b: Stock levels in the shop can be updated accordingly and the purchase will appear in the customer's profile.
I know that Paypal can redirect to the site, but I don't know where to have it redirect so that the above can be completed automatically. What do others do in this situation?

Cheers
Andrew

Edited by AndrewRavenwood, 11 June 2012 - 09:57 AM.


#2   toyicebear

toyicebear
  • Community Sponsor
  • 6,057 posts
  • Real Name:Nick
  • Location:World Citizen

Posted 11 June 2012 - 10:21 AM

Any particular reason you are trying to "re-invent the wheel"?  There are plenty of ready to use PayPal modules available, click me...
Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce

Check out my profile [click here] for information on professional services, custom coding, templates, SEO optimization, modifications, commercial support and help.

#3   AndrewRavenwood

AndrewRavenwood
  • Members
  • 54 posts
  • Real Name:Andrew
  • Gender:Male

Posted 11 June 2012 - 10:31 AM

@toyicebear I don't regard it as re-inventing the wheel. I'm only trying to properly use the module provided with the basic install of OSCommerce. Do I need to install further modules to make this work?

Edit to add: Thanks for the link. I'm actually using Version 2.1.3 of OSCommerce.
What I need is essentially some documentation or a good comprehensive tutorial explaining how to make the Paypal module work.

Edited by AndrewRavenwood, 11 June 2012 - 10:35 AM.


#4   toyicebear

toyicebear
  • Community Sponsor
  • 6,057 posts
  • Real Name:Nick
  • Location:World Citizen

Posted 11 June 2012 - 11:24 AM

There are 3 PayPal modules included as standard in 2.3.1.

If you use the one named PayPal Standard , you can make it work simply by adding your paypal email address.

That's actually all that is needed for customers to be able to pay at your site using PayPal.

For the Express module you will need to get API credentials from PayPal.

For the Pro module you will need to sign-up for it at PayPal first, it also comes with a monthly fee.

Edited by toyicebear, 11 June 2012 - 11:25 AM.

Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce

Check out my profile [click here] for information on professional services, custom coding, templates, SEO optimization, modifications, commercial support and help.

#5 ONLINE   14steve14

14steve14

    STORE OWNER NOT CODER

  • Members
  • 3,080 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Dorset UK

Posted 11 June 2012 - 11:53 AM

To enable the customer to return to your website, add the return url to your checkout process in your paypal profile.
REMEMBER BACKUP, BACKUP AND BACKUP
I am not a coder, so dont bother sending PMs asking for help as you wont get any.  

OSC has a steep learning curve, but in general the program does work.  If it doesnt work, the chances are it is something you have done.

#6   AndrewRavenwood

AndrewRavenwood
  • Members
  • 54 posts
  • Real Name:Andrew
  • Gender:Male

Posted 11 June 2012 - 02:48 PM

@14steve14 that would be checkout_confirmation.php then? If so then I think I'm guilty of over-complicating the process in my mind - Which wouldn't be the first time.

Edited by AndrewRavenwood, 11 June 2012 - 02:48 PM.


#7 ONLINE   14steve14

14steve14

    STORE OWNER NOT CODER

  • Members
  • 3,080 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Dorset UK

Posted 11 June 2012 - 03:46 PM

I could be corrected here, but if you are using 2.3.1 the return url should be to your checkout_process.php.

There are enough threads on this site about setting up paypal, and i am 100% convinced a search will find a few of them. Paypal standard is so easy to setup, just enter your email address. What is more difficult is goimng through your paypal profile pages and setting everything up that end. Make sure you have set the return URL and activated it, and that you allow IPN checkout. I think the only other setting that really matters is something to do with the shipping area where you have to not allow paypal shipping costs, or something like that.
REMEMBER BACKUP, BACKUP AND BACKUP
I am not a coder, so dont bother sending PMs asking for help as you wont get any.  

OSC has a steep learning curve, but in general the program does work.  If it doesnt work, the chances are it is something you have done.

#8   AndrewRavenwood

AndrewRavenwood
  • Members
  • 54 posts
  • Real Name:Andrew
  • Gender:Male

Posted 12 June 2012 - 08:05 AM

@14steve14 Thanks, that's really helpful information. Hopefully I will find time today to implement this.

#9   AndrewRavenwood

AndrewRavenwood
  • Members
  • 54 posts
  • Real Name:Andrew
  • Gender:Male

Posted 12 June 2012 - 09:52 AM

Update: Had a play with setting this up this morning.

I've got the cart running in sandbox mode, IPN enabled and tested on 'checkout_process.php' - so far so good.

But there is a problem. I have set the return url to 'checkout_process.php', 'checkout_success.php' and 'checkout_confirmation.php' and each time after payment my test buyer is redirected to 'shopping_cart.php'. Furthermore my test buyer is signed out of the OSCommerce site and his purchase is not registered.

Frustrating B)

Edited by AndrewRavenwood, 12 June 2012 - 09:53 AM.


#10   satish

satish
  • Members
  • 5,350 posts
  • Real Name:Satish Mantri
  • Gender:Male
  • Location:Nagpur(India)

Posted 12 June 2012 - 07:07 PM

This means that when you return from Paypal oscsid(session ID is lost).

Solution I recommed is to set force cookies to true.This will result in session ID being in cookies.

Also make sure session are not getting recreated.There are few configuration in admin for session make sure they are set properly.

Satish
Ask/Skype for  Free osCommerce value addon/SEO suggestion tips for your site.

Check My About US For who am I and what My company does.