Giter Club home page Giter Club logo

billing-demo-app's Introduction

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.

billing-demo-app's People

Contributors

ch33sybr3ad avatar jules2689 avatar shopify-admins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

billing-demo-app's Issues

bin/setup - No env file?

= Copying sample files ==
.env
cp: .env.example: No such file or directory

Is that file perhaps missing from repo?

Trying to run the demo / Your browser does not support cookies

For some reason when trying to install the app, the app will in fact install, but I get when trying to access the app:

"The application cannot be loaded, please check that your browser allows third party cookies."

I, [2016-03-22T21:05:56.779907 #20128] INFO -- omniauth: (shopify) Setup endpoint detected, running now.
21:05:56 web.1 | I, [2016-03-22T21:05:56.780023 #20128] INFO -- omniauth: (shopify) Request phase initiated.
21:05:57 web.1 | I, [2016-03-22T21:05:57.467388 #20128] INFO -- omniauth: (shopify) Setup endpoint detected, running now.
21:05:57 web.1 | I, [2016-03-22T21:05:57.467499 #20128] INFO -- omniauth: (shopify) Request phase initiated.
21:05:58 web.1 | I, [2016-03-22T21:05:58.403212 #20128] INFO -- omniauth: (shopify) Setup endpoint detected, running now.
21:05:58 web.1 | I, [2016-03-22T21:05:58.403435 #20128] INFO -- omniauth: (shopify) Request phase initiated.
21:05:58 web.1 | I, [2016-03-22T21:05:58.883692 #20128] INFO -- omniauth: (shopify) Setup endpoint detected, running now.
21:05:58 web.1 | I, [2016-03-22T21:05:58.883786 #20128] INFO -- omniauth: (shopify) Request phase initiated.

I am just using some local certs and foreman to get it running on ssl

web: thin start -p 3000
web: thin start -p 3001 --ssl --ssl-key-file server.key --ssl-cert-file server.crt

( I use this method for my other apps. )

-- I definitely have cookies enabled. And tried installing on more than 1 app.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.