Giter VIP home page Giter VIP logo

paymentshubdevelopers / paymentshub-node-browser-post-custom-pay-api Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 28.06 MB

This repo includes the full-stack code for a JavaScript application that uses Node.js to make a sale using Payments Hub's Browser Post API, and perform a refund using Payments Hub's Custom Pay API.

Home Page: https://developer.paymentshub.com/blog/tutorial-nodejs-browser-post-custom-pay-api

JavaScript 27.38% EJS 72.62%
checkout-form checkout-page ecommerce ecommerce-api ecommerce-website nodejs nodejs-payment payment-api refund

paymentshub-node-browser-post-custom-pay-api's Introduction

Securely Embed Payments in a NodeJS App and Accept Refunds

This is a JavaScript application that uses Node.js to demonstrate accepting a payment with an ecommerce payment form using Payments Hub's Browser Post API, then using the returned transaction token to perform a refund on the sale using Payments Hub's Custom Pay API. The code in this repository handles both the front-end and back-end payment process.

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 and Custom Pay 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 Pay button to open the payment form:

payments-hub-node-browser-post-custom-pay-api

Click the "Submit" button to submit a payment:

payments-hub-node-browser-post-custom-pay-api-2

On the payment result page, customers have the option to request a refund:

payments-hub-node-browser-post-custom-pay-api-3

The results of the refund will be displayed after processing is complete:

payments-hub-node-browser-post-custom-pay-api-4

paymentshub-node-browser-post-custom-pay-api's People

Contributors

paymentshubdevelopers avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.