Commerce DrupalGap Stripe

Provides the stripe payment gateway to commerce drupalgap.

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

  1. Install this module on your Drupal site:
  • https://drupal.org/sandbox/signalpoint/commerce_drupalgap_stripe
  1. On your Drupal site, go to: admin/structure/services/list/drupalgap/resources

    Then check the box next to "commerce-payment-stripe" and hit "Save".

  2. 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

  1. 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'.

  2. Download the jquery.payment.js file to your app's www directory:

  • https://raw.githubusercontent.com/stripe/jquery.payment/master/lib/jquery.payment.js
  1. 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>
  1. Modify settings.js to include the commerce_drupalgap_stripe module:
/* Contrib Modules */
Drupal.modules.contrib['commerce_drupalgap_stripe'] = {};
  1. Add your publishable Stripe API key to the settings.js file, for example:
// Stripe API Key
drupalgap.settings.stripe_api_key = 'abcdefghijklmnopqrstuvwxyz1234567890';