Currently I am in the process of setting up a payment gateway for a new site I am working on and I thought I would document the steps outlined, just so I can refer back for any future projects that may need a similar payment approach.
The first step is to set up an account at the paypal developer site https://developer.paypal.com/
After setting up your account and logging in, the next step is to create a minimum of one merchant account and one buyer account, I suggest making at least two buyer accounts, that way you can get one of your mates to go through the purchase process also.
Setting up an account for your friends to test won’t work because you have to log into your Sandbox account to test this process.
To do this you should see a link on the home page with the text “Create a preconfigured buyer or seller account.” click on it to set up your accounts.
I usually use the pre-configured option, but I like to add extra funds into the accounts, by default they are set to a zero balance.
On this page there is an option to create both a buyer and a seller profile, as mentioned before create a minimum of one of each, make a note of your passwords and email addresses.
Side-note: I am not sure what the disabled setting does so I changed that to enabled.
The next step is to sign into the merchant account, you want to configure the S2Member plugin with your Sandbox account so you can create your Pay Now buttons inside of S2Member.
Just make sure the radio button on the business account is checked and click on the Enter Sandbox Site button.
Because I am testing this payment process using the s2Members Plugin I want to make sure I follow all of the steps as I normally would when setting this plugin up with my site.
When you have the S2Members plugin activated on your blog go to the “s2Member PayPal® Options” section just under the Settings area to configure this with your sandbox account.
The first thing you will need to do is add the fake seller email address, next you will have to make sure that the sandbox testing radio button is checked, and to be honest, I havn’t figured out what the Enable Logging Routines? does yet, but I checked it anyway.
The next step is to follow the details outlined in the “PayPal® IPN / Instant Payment Notifications” settings tab, I won’t go through all of the details here, if you have the plugin installed you will know what to do.
Side-note:A point worth mentioning is when you are setting up the “PayPal® PDT Identity Token” inside of your sandbox account you will need to save your settings and then go back to the “Website Payment Preferences” page to get the “PayPal® PDT Identity Token:”
The rest of the email settings wont work in the sandbox so I just left them “As Is”
If all goes well this should work.
Make sure you save your changes and go and get your button under the “s2Member / PayPal® Button Codes” section.
Simply create a payment option in the settings area and click on the “Generate Button Code” button.
For this test I am not going to use the shortcodes but paste in the full button code, the reason being is, there are a couple of payment options that S2Member doesn’t have yet, so after contacting the S2Member support forum I was told to use the full code.
After generating your button, simply copy the code and paste it into the webpage that you will be selling your product or service from and upload or update your webpage, whatever the case may be.
I like to open a new browser so I know I am not logged into the site I am wanting to test my payment process on. But, you will need to make sure you are logged into your paypal sandbox account in the new browser for this to work.
Click on the new button you have just published to your website and choose the pay with paypal option then insert the login details of the fake buyer info that you set up in the previous steps.
If you have configured everything correctly you should go through the entire payment process, and be sent back to your signup page where the user can then enter in their new username and contact details in order to access the Members Only Area of your site.
Currently experiencing some difficulty in getting s2member to work with paypal website standard. S2member is not sending the confirmation email to the user who has just paid for a subscription. leaving them with no access to the site they just paid for. Also Paypal is stating this error on completion of payment
“Unable to verify POST vars. Please contact Support for assistance
This is most likely related to an invalid PayPal configuration.
Please check s2Member -> PayPal options”
Sorry Dan, but I can’t offer an explanation for the error, I could only suggest you contact paypal and the S2members plugin authors.
Thanks Jeremy for that insightful article. I’ll keep a note about it.
@dan. To get that mail confirmation, did you check if it got out of the system? Even though we setup a server to run an application we have to make sure such things are properly configured. It’s no magic.
Hey Jeremy – thanks for the post.
I am trying to set up s2Member and test it via paypal’s sandbox, just like you described, but am hitting on some problems.
One question for you: When you say
“The next step is to sign into the merchant account, you want to configure the S2Member plugin with your Sandbox account so you can create your Pay Now buttons inside of S2Member.” which merchant account am I to log into? In other words: log in to the WP admin site, or the merchant’s paypal account, or the sandbox account created in previous steps?
The rest of my woes are described in this thread on the Primo Themes forums, if you (or any of your readers) wonder about the steps I took so far or feel like pitching in
http://www.primothemes.com/forums/viewtopic.php?f=4&t=1303
Thanks in advance,
FR
It has been some time since I wrote this post so please forgive me if I get this wrong, but you want to log into the Paypal sandbox account. Add all of the information in the S2 plugin configuration inside of WordPress from the sandbox account exactly if you were setting up for your merchant paypal account.
Thank you Jeremy!
Dear Jeremy,
I have configured S2Members. But after doing payment it does not show me the registration page when coming back to my site. it redirects to the home page.
Please suggest me what should i do? I am working on my local machine for development.
Many Thanks,
Baran