How to set up PayPal #1

Open
jedateach opened this Issue Feb 23, 2012 · 16 comments

Comments

Projects
None yet
6 participants
Contributor

jedateach commented Feb 23, 2012

Feedback from a user:

I found that the installation documentation was missing specifics in terms of what I needed to have (at a minimum) in the mysite/_config.php file to have the module function. After scouring the forum for hours and trying various things I was able to figure it out but felt that if this was included more clearly in the installation documentation I would have saved a ton of time and been more satisfied with the Paypal Payment extension as well as the ease to add extensions to the ecommerce module itself.

I seem to be having a similar difficulty getting paypal setup within current versions of SS, Shop, and Omnipay. I tried a post on the SS forum yesterday but no response as yet: http://www.silverstripe.org/e-commerce-modules/show/43070

Any straight forward way (examples) to get this up and running and verified as working?

Though I know of course everyone’s issues are, this is pretty important, its holding back a site which is otherwise ready for production.

The rest of the shop features seem good, very happy and appreciative, but the crucial paypal component seems ineffective using what I've read in docs/forums so far.

Could use some help & guidance if possible. Many thanks!

We got Paypal running, but we had to branch both the shop and omnipay modules a little while back because there were some changes coming through that broke some customisations on the particular project we were working on. The site itself is not open source (there are a lot of components overridden including the CheckoutPage and OrderForm) but you're welcome to see at least partially what we did here: https://github.com/markguinn/silverstripe-shop/tree/custom-daywind and here: https://github.com/markguinn/silverstripe-omnipay/tree/custom-daywind. My colleague @clintLandrum might be able to answer further questions as he did more of the work on that specific piece.

TL;DR; = it is possible

Contributor

wildflower commented Mar 6, 2014

Sorry this will be a bit vague but I'm pretty sure my version works
https://github.com/wildflower/silverstripe-payment-paypal
on this version of SS shop
https://github.com/wildflower/silverstripe-shop
I think it's running on SS3

I know I have an SS3 shop using the eway payment gateway, which is still in the testing /demo phase and I haven't looked at it since Xmas 2012

Contributor

nimeso commented Mar 7, 2014

@ellecarrier are you using the e-commerce module and not this shop module? Because the e-commerce module will not support the new omnipay module :( @jedatech and myself have made huge changes to both the shop module and omnipay over the last few days so make sure you are running the latest versions of everything... Can you give us some more details about the issue you are having? I am away on holiday till the 10th and jedatech is away for 3 weeks but I'll try my best to help you

Contributor

nimeso commented Mar 7, 2014

@ellecarrier are you using the e-commerce module and not this shop module? Because the e-commerce module will not support the new omnipay module :( @jedatech and myself have made huge changes to both the shop module and omnipay over the last few days so make sure you are running the latest versions of everything... Can you give us some more details about the issue you are having? I am away on holiday till the 10th and jedatech is away for 3 weeks but I'll try my best to help you

Thanks Guys, Just reading through the links now...

Aha @nimeso I see a number of commits in last week, just updating now.

In the meantime I can confirm I definitely have ss-shop installed, yes:
"silverstripe/cms": "3.1.2",
"silverstripe/framework": "3.1.2",
"silverstripe-themes/simple": "*",
"burnbright/silverstripe-shop": "dev-master",

Ok, So far I've updated Shop & Omnipay modules to latest versions, today.

Setup a paypal sandbox business account

And added the following to payment.yml in mysite/_config:

Name: payment
Payment:
allowed_gateways:
- 'Manual'
- 'PayPal_Express'
parameters:
PayPal_Express:
username: 'mail_api1.xyz.com'
password: 'xyz3074xyz'
signature: 'xyzxyzxyzcxyznMrRaUQ1XSTVm8LA0U6l7SMFmbnX26bCOGf.jGcZH

On 'proceed to payment' after selecting paypal_express I get this: Error (): Security header is not valid

Note: Manual payments proceeds ok and is logged in system

Cumquat commented Mar 20, 2014

I have the same error, when i use my live paypal account it works the problem seems to be with passing it to the sandbox paypal system, anyone got any ideas?

Thanks @Cumquat, I can confirm my live account is proceeding through to paypal gateway but not the sandbox account, things are progressing : )

Contributor

jedateach commented Mar 27, 2014

@ellecarrier can you try adding the following to your parameters:

Payment:
        PayPal_Express:
            testMode: true

(similar to the example seen here: https://github.com/omnipay/omnipay )

... if this is the issue, I'll update the docs.

Thanks @jedateach I'll be able to test this setup in about 12 hours, will get right back and confirm...

No, I can confirm testMode: true in yml is still not having any effect for paypal sandbox, for me anyways, it just processes a manual payment and never contacts paypal at all.

Contributor

wildflower commented Mar 31, 2014

I'm finding the same issue as ellecarrier, there doesn't appear to be any attempt at a connection to paypal via the sandbox, Order records are being created and I can see them in the backend CMS.
The Order has a status of Unpaid and the Payment has a status of Authorized with a Gateway of Manual. I'll need to put some debugging in to see where it stops tomorrow.

Contributor

wildflower commented Mar 31, 2014

I'm on a different machine to last night and have managed to get the Payment options to display in the Checkout form now.
I created a payment.yml file in mysite_config/payment.yml
it only has 2 spaces (not tabs) for indentation - I copied/renamed the config.yml file to be sure of the formatting

payment

now I have 2 options on the checkout form after I go to
http://mysite/index.php/dev/tasks/PopulateCartTask

checkout

I didn't have these options before when I think I recreated ellecarrier's symptom earlier.

Paypal have got a whole lot of new APIs now since I last looked at it (a year + ago) and fear this omnipay payment.yml configuration may need to be changed also

Some more issues with SS-Shop here, I just got a message from site Admins after some testing:

  • live payments are showing as authorised in CMS but no money transferred to paypal account
  • those authorised payments are not creating orders in CMS either (manual, and unauthorised payments are showing up in orders)
  • User experience says ---> "After you click proceed to payment, and then go to the link: pay with your paypal account, and enter your paypal account, to end up click the pay now buttom, it will send you again to the check out page..."

I was assuming I could just install this SS Mod add Payal info and be more or less setup with a few tweaks, seems not. If this solution is not possible to achieve right now I'll probably have to drop SS and Shop and rebuild with something else that is more 'tried and tested'.

Thanks for the learning experience! : )
~ Sean

Contributor

jedateach commented Feb 2, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment