Provides the stripe payment gateway to commerce drupalgap.
- Download
- Browse code repository
- Issues (0)
- Star Gazers (0)
- Forks (0)
- Updated: 2016-12-13
Drupal Core:
- 7.x
Commerce DrupalGap Stripe
Accept payment through the Stripe payment gateway for your Drupal Commerce website inside your DrupalGap mobile application.
Setup
- Install this module on your Drupal site:
- https://drupal.org/sandbox/signalpoint/commerce_drupalgap_stripe
On your Drupal site, go to:
admin/structure/services/list/drupalgap/resources
Then check the box next to "commerce-payment-stripe" and hit "Save".
Download the Stripe PHP library v1.18.0:
https://github.com/stripe/stripe-php/releases/tag/v1.18.0
Unzip it (and possibly rename the folder) so it lives here in your Drupal site:
sites/all/libraries/stripe-php
On your Drupal site, go to:
admin/commerce/config/payment-methods
Click 'edit' next to Stripe in the listing, then under 'Actions' click 'edit', then enter your 'Secret Key' and 'Publishable Key' that you obtained from Stripe, then click 'Save'.
Download the
jquery.payment.js
file to your app'swww
directory:
- https://raw.githubusercontent.com/stripe/jquery.payment/master/lib/jquery.payment.js
- Add these scripts to your DrupalGap's
index.html
file, below the jQueryMobile includes in the '`:
<script type="text/javascript" src="jquery.payment.js"></script>
<script type="text/javascript" src="https://js.stripe.com/v2/"></script>
- Modify settings.js to include the
commerce_drupalgap_stripe
module:
/* Contrib Modules */
Drupal.modules.contrib['commerce_drupalgap_stripe'] = {};
- Add your publishable Stripe API key to the settings.js file, for example:
// Stripe API Key
drupalgap.settings.stripe_api_key = 'abcdefghijklmnopqrstuvwxyz1234567890';