Skip to content
No description, website, or topics provided.
Ruby HTML CSS CoffeeScript
Branch: master
Clone or download
Latest commit b8c9753 Dec 5, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app application credit page Sep 1, 2016
bin billing demo application Mar 21, 2016
config application credit page Sep 1, 2016
db billing demo application Mar 21, 2016
lib
log billing demo application Mar 21, 2016
public billing demo application Mar 21, 2016
test billing demo application Mar 21, 2016
vendor/assets billing demo application Mar 21, 2016
.env.example add example .env file Jul 28, 2016
.gitignore dev files + small fixes Jul 28, 2016
Gemfile Bump rails Nov 27, 2017
Gemfile.lock Bump rails Nov 27, 2017
LICENSE billing demo application Mar 21, 2016
README.md billing demo application Mar 21, 2016
Rakefile billing demo application Mar 21, 2016
config.ru billing demo application Mar 21, 2016
dev.yml [bot] remove unused 'packages' dev.yml element [skip ci] Dec 4, 2017
railgun.yml [#railgun] migrate configuration to 2.0+ format (1/2) Sep 12, 2017

README.md

Billing Test App

This is a demo app that showcases Shopify's Billing API. It's meant to be used by Shopify partners and developers to learn how to interact with the Billing API, and to discover new billing features.

Here's what you can do in this demo:

  • Create one-time charges.
  • Create recurring charges.
  • Create usage-based charges.

Usage

You can install the demo from here

Getting Started

  1. Go to http://billing.shopifyapps.com/
  2. Type in your test store's domain (E.g. your-store.myshopify.com), then click "Install".
  3. Click on the type of charge you want to create.
  4. Fill in the fields, and submit the form.

Note: Creating a recurring charge for usage charges will delete a regular recurring application charge if you have one, and vice versa.

Development

Requirements

This is built using Ruby 2.1.6, Ruby on Rails, the Shopify App gem, and the Shopify API gem. You'll need a basic Ruby on Rails development environment, and a Shopify Partner account.

The Shopify admin requires all apps to use HTTPS. This can be awkward to configure when developing your app, so we recommend using a service that will tunnel HTTPS requests from a public URL into your app such as:

The setup instructions will assume that you're using ngrok.

Setup

Here are instructions to begin developing with this demo app.

Create an application in your Shopify Partner account

  1. Login to your Shopify Partner account.

  2. Go to the Apps page in your Partner admin.

  3. Create a new application by clicking "Create a new app" in the top-right corner. Use the following settings when filling in the fields:

  • Embedded settings: Enabled
  • Application URL: If you're running this demo app on your own computer, you probably want https://your-app.ngrok.io . Otherwise, it must be the full URL to your app.
  • Redirection URL: If you're running this demo app on your own computer, you probably want https://your-app.ngrok.io/auth/shopify/callback . Otherwise, it must be your app's OAuth callback URL.
  1. Click on "Show secret", and keep this browser tab open. You'll need the API key and secret token later.

Installation

  1. Clone this Git repository, then enter its directory.

  2. Run the command bin/setup

  3. In the file .env , replace the example values with the details from your Partner application.

  4. Start the web server by running bundle exec rails server

  5. In a web browser, go to the Rails server. If you're running this demo app on your own computer, the URL will probably be https://your-app.ngrok.io

Documentation

Copyright

Copyright (c) 2012 "Shopify inc.". See LICENSE for details.

You can’t perform that action at this time.