All Projects → Shopify → interledger-payment-app-example

Shopify / interledger-payment-app-example

Licence: other
An implementation of the Interledger spec through an Android's Payment App

Programming Languages

java
68154 projects - #9 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to interledger-payment-app-example

XpringKit
XpringKit provides a Swift SDK for interacting with Xpring Protocols (XRP/PayID/ILP). This library is deprecated.
Stars: ✭ 23 (-11.54%)
Mutual labels:  interledger
next-shopify-starter
Nextjs + Tailwind CSS + Shopify Starter
Stars: ✭ 385 (+1380.77%)
Mutual labels:  shopify
jimbo
Jimbo - The Free to use and powerful Shopify Bot
Stars: ✭ 22 (-15.38%)
Mutual labels:  shopify
shopify-mail-notifications
Blazing-fast Shopify mail notifications templating environment with Liquid, MJML and Twig
Stars: ✭ 25 (-3.85%)
Mutual labels:  shopify
WeIdentity
基于区块链的符合W3C DID和Verifiable Credential规范的分布式身份解决方案
Stars: ✭ 1,063 (+3988.46%)
Mutual labels:  w3c
awesome-shopify
👩‍🎓👨‍🎓 Must-read articles, videos and books for store owners, app and theme developers.
Stars: ✭ 86 (+230.77%)
Mutual labels:  shopify
vox
⚡️ instant interactivity for the web 💫
Stars: ✭ 85 (+226.92%)
Mutual labels:  shopify
shopify-slater-tailwindcss
Shopify Starter Theme + TailwindCSS with PurgeCSS
Stars: ✭ 40 (+53.85%)
Mutual labels:  shopify
gulp-html
Gulp plugin for HTML validation, using the official Nu Html Checker (v.Nu)
Stars: ✭ 70 (+169.23%)
Mutual labels:  w3c
gridsome-starter-shopify-advanced
A Gridsome starter for Shopify, complete with authentication 🔐
Stars: ✭ 16 (-38.46%)
Mutual labels:  shopify
ShopifyCheckoutJS
A little code for having a better experience manipulating Shopify´s Checkout via JS.
Stars: ✭ 55 (+111.54%)
Mutual labels:  shopify
web-payments-example
Demo for Payment Request API and Apple Pay for the Web API
Stars: ✭ 31 (+19.23%)
Mutual labels:  payment-request
ecommerce integrations
Ecommerce integrations for ERPNext
Stars: ✭ 54 (+107.69%)
Mutual labels:  shopify
mechanic-tasks
Public task repository for Mechanic (https://mechanic.dev)
Stars: ✭ 42 (+61.54%)
Mutual labels:  shopify
7cart
7cart is a php7 project for building online shops, catalogs or service platforms. 7cart built with simple code and database schema. It is easy to support and fast.
Stars: ✭ 27 (+3.85%)
Mutual labels:  shopify
react-autofill
Automate the filling of checkout forms, increasing your chance of purchasing limited release items.
Stars: ✭ 57 (+119.23%)
Mutual labels:  shopify
gridsome-starter-shopify
Gridsome Shopify Starter
Stars: ✭ 46 (+76.92%)
Mutual labels:  shopify
multi-brand-colors
Multi Brand Colors with support for CSS/CSS-Vars/SCSS/SASS/Stylus/LESS/JSON
Stars: ✭ 26 (+0%)
Mutual labels:  w3c
go-shopify
DEPRECATION NOTICE: Continuing support for the go-shopify library will be at Bold Commerce's fork. Please open issues and pull requests over there.
Stars: ✭ 49 (+88.46%)
Mutual labels:  shopify
slimdom.js
Fast, tiny, standards-compliant XML DOM implementation for node and the browser
Stars: ✭ 21 (-19.23%)
Mutual labels:  w3c

Interledger Payment App Example

This is a project that was done as part of a hack-o-thon organized at the Interledger Workshop at Blockchain Expo. This repo is meant as a showcase of an Android payment app, using the Interledger spec for payment.

As such, it contains both the website implementation of the Payment Request and a Payment App itself. It does not contain the ledger implementations. These are hardcoded to use https://red.ilpdemo.org and https://blue.ilpdemo.org as originating and the destination ledgers. Both are running the NodeJS ILP kit and have been implemented as an initiative to show off the Interledger spec.

Context

In order for the Payment App to be presented as a payment choice for the user through the Payment Request sheet, two conditions have to be met:

  1. The website using Payment Request has to specify an Interledger Payment Method
  2. A payment app with an Interledger payment method has to be exposed to the browser

As of writing, only Chrome Canary 60+ supports Payment Apps and the Interledger payment method. These Payment Apps are automatically discovered by Android when they expose an intent-filter as such:

<action android:name="org.chromium.intent.action.PAY" />
.

Once the buyer initiates a Payment Request, if the buyer's and provider's payment method intersect, he'll get presented a payment sheet where he can provide his information, choose a Shipping Method and a payment method. Once the user choses the Payment App through the payment sheet and proceeds to pay, the sheet then transfers control to the Payment App, which deals with the payment.

For more information, you can read up on:

This repo focuses on Google's beta implementation of Payment App's on Android, through Chrome Canary 60+.

Demo

Demo

This demo shows off transferring an amount from ledger [email protected] to [email protected].

Some assumptions

As with any project in a hack-o-thon, a few shortcuts were taken for simplicity:

  1. The app has hardcoded user credentials for the originating ledger (see: https://github.com/Shopify/interledger-payment-app-example/blob/9cab508fc6ed383b6949c341c338a04cc652a64a/PaymentApp/app/src/main/java/com/shopify/paymentapp/Credentials.java#L8:L10); In a real world use case, the user would be expected to authenticate within the app to a third party ledger (a wallet for example)

  2. Both the originating ledger (red.ilpdemo.org) and the destination ledger (blue.ilpdemo.org) are instances of the NodeJS ILP kit and are not part of this repo. Both ledgers have each other as peers, and each one has a user named "Alice".

Prerequisites

Languages

  • Python
  • Java

Libraries

  • android-sdk

Setup

  1. Install the android system image used for the emulator
sdkmanager "system-images;android-25;google_apis;x86"
  1. Install Android platform tools
sdkmanager "platforms;android-25"
  1. Create the Android emulator using the Pixel XL image
avdmanager create avd --package "system-images;android-25;google_apis;x86" --name "payment-app-device" --tag "google_apis" -d "pixel_xl"
  1. Enable hardware keyboard in the emulator config, for sanity
sed -ie 's/hw\.keyboard=no/hw\.keyboard=yes/g' ~/.android/avd/payment-app-device.avd/config.ini
  1. Appending some additional Android emulator configurations
echo "showDeviceFrame=yes\nskin.name=1440x2560\nhw.gpu.enabled=yes\nhw.gpu.mode=host" >> ~/.android/avd/payment-app-device.avd/config.ini
  1. Finish setup of the emulator by:

    1. Running the emulator
    ./bin/start_emulator
    
    1. In a separate window, running
    ./bin/setup_emulator
    
  2. Then, in the Android emulator, launch Chrome Canary

  3. Visit chrome://flags/#android-payment-apps

  4. Enable the Android Payment Apps beta flag as such:

Android Payment Apps beta flag

  1. Close the emulator

Playing around

For simplicity, we'll refer to the website that implements PaymentRequest as an online store.

Important: You'll have to find a way to serve the online store through HTTPS, as PaymentRequest only works with SSL. There's a few ways of doing this, but the easier way is to use a proxy or tunneling service (like Ngrok).

  1. Start the online store
./bin/start_online_store
  1. Somehow enable SSL for said online store (through a proxy or tunneling service, as explained higher up)

  2. Start the emulator

./bin/start_emulator
  1. Open up Chrome Canary and visit the online store URL (remember, it has to support SSL)

  2. Click on Buy

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].