Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

Silverstripe Shop with Stripe Payments


Go to End


3 Posts   1973 Views

Avatar
Vix

Community Member, 60 Posts

10 September 2015 at 8:49pm

I am just having a look around the Silverstripe Shop module that uses Omnipay and I am not quite sure how to set up the yaml file for Stripe payments. I can get the Paypal one to work, just not sure exactly what I need to add to allow stripe. (Sorry complete newbie to the shop module)

mysite/_config/payment.yml

---
Name: payment
---
Payment:
    allowed_gateways:
        - 'PayPal_Express'
    parameters:
        PayPal_Express:
            username: 'mytestaccount'
            password: 'mytestpassword'
            signature: 'mytestsignature'
            testMode: true

I have tried adding

---
Name: payment
---
Payment:
    allowed_gateways:
        - 'PayPal_Express'
        - 'StripePaymentGateway'
    parameters:
        PayPal_Express:
            username: 'mytestaccount'
            password: 'mytestpassword'
            signature: 'mytestsignature'
            testMode: true
       StripePaymentGateway:
           test_api_secret: 'sk_test_xxxxxxx '
           api_secret: 'sk_live_xxxxxx'

If anyone can point me in the right direction that would be great.

Avatar
markguinn

Community Member, 27 Posts

10 September 2015 at 10:09pm

Thanks for posting. I think that "apiKey" is the key you're looking for but I've never done a Stripe integration so I can't say 100%. You'd need to break the configuration block into live and non-live sections as in this example: https://github.com/burnbright/silverstripe-omnipay#configuration and just use you test key (plus testMode:true) in one and live key in the other.

Also note that shop+omnipay isn't currently able to use stripe.js to tokenize cards on the client. It's something we've started laying a foundation for but have not completed yet (see https://github.com/burnbright/silverstripe-omnipay/pull/63 if you're interested). You could probably take those pull requests and implement something using stripe.js if you tried though.

Avatar
LeeSylvester

Community Member, 11 Posts

20 December 2015 at 2:58pm

Has there been any updates with this? PayPal errors if I try to create a classic app, and I'd prefer to use Stripe, anyway. I get a 500 error if I try to integrate Stripe.