Forum
Perch Shop - Worldpay + Paypal
Hi
Just finished a perch shop development using Worldpay as the payment gateway... client just turned around to me and said "Think we need to offer paypal too"
What's the best way of going about that? Not the greatest at adding any custom PHP into a site and stick to what I know... is it easy?
Any help would be vastly appreciated as the site needs to go live "with paypal" on the 1st September if at all possible
Nik
Yes, it's very simple to have both - where are you struggling?
Basically, I've followed the documentation here to set up Worldpay as a gateway
https://docs.grabaperch.com/addons/shop/gateways/worldpay/ https://docs.grabaperch.com/addons/shop/gateways/
But I can't seem to find anything that shows me how to have two gateways... I know you don't want to restrict anyone by pushing them in a certain direction with this add on and I totally respect that
I'm still very new to the Perch Shop add and this has been my first attempt (and has gone very well) - but not ashamed to say I'm quite stuck...
So the next thing to do would be to follow the Paypal gateway instructions and add that to your page.
You know what - I always thought WorldPay could be setup to accept PayPal payments? Or am I wrong about that...
Ok, will have a go at that and post back if I have any problems. I assume I put the paypal gateway code beneath my worldpay code on the same page. But set my paypal button to access a different checkout page to the one I set up the worldpay info on? Sounds a little too simple!
Duncan, yeah... in a perfect world... though my client has a funny version of their Worldpay merchant account which doesn't allow paypal to be added to the checkout. They also don't want to switch to another version for reasons they've not been clear on.
Ah, fair enough - I've not personally tried it, but I know it's quite convoluted anyway. It's probably easier to get it working through another gateway...
Right Drew... I've finally managed to get it set up and running (sort of) I've definitely messed up my config file, I'll post below with sensitive details removed of course.
I've also tried this with both gateways in the config file wrapped in separate php tags... in that case Worldpay worked fine and paypal didn't go anywhere, it went straight to the payment failed page (and fired off a thank you email to the customer)
Any ideas what I've done wrong... both gateways seem to work fine individually, but not together in the same config file so I'm sure my cack handed-ness is responsible for that.
Any help much appreciated
I think you only need one
gateways
array (you have two) - then have your Paypal and worldpay arrays inside it. See if that helps.Thanks Duncan, so obvious once you pointed it out!