Skip to content

This repo includes the front-end code for a JavaScript application that uses the React framework to build a shopping cart and embed a payment form using Payments Hub's Browser Post API.

Notifications You must be signed in to change notification settings

PaymentsHubDevelopers/PaymentsHub-React-Browser-Post-API-With-Shopping-Cart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build a Shopping Cart and Securely Embed Payments in a ReactJS App

This is a JavaScript application that uses the React framework and Node.js to demonstrate an ecommerce shopping cart with an embedded payment solution using Payments Hub's Browser Post API. The code in this repository handles the front-end payment process and adds a shopping cart with a simple payment form to a website. The code that handles back-end part of the payment process is located in a separate repository, allowing each to be deployed separately.

Get Sandbox Credentials

To get started, create a free Payments Hub Developer Portal account. This will allow you to get the sandbox credentials that are required to test the app. Log in to your account to view the official Browser Post API Integration Guide, then contact the Payments Hub Sales Engineering team to get sandbox credentials added to your Developer Portal account.

Follow Along with the Tutorial

When you're ready to start building your app, you can follow along with this tutorial for step-by-step instructions.

Completed App

Your completed ecommerce app will look similar to the following:

Click the "View Details" button to open a product page:

Click the "Shopping Cart" button to open the cart modal, which displays the items in your cart, the total order amount, and allows users to edit the contents of their cart:

Click the "Checkout" button to open a new tab with a checkout form where customers can enter their payment information and submit an order: