Skip to content

apoorv9496/square-payments-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

In-App Payments Server Quickstart

This is an example server with a single endpoint of /chargeForCookie for processing payments using Square. The server expects a POST request with a payload of application/json following the format:

{
  "nonce": "INSERT_YOUR_NONCE_HERE"
}

Please replace "INSERT_YOUR_NONCE_HERE" with your own nonce this was generated from either the Square Payment Form or the In-App Payments SDK.

Instructions

Deploy to Heroku

  • Click the Deploy to Heroku button
  • Login or create a Heroku account
  • Enter a unique Heroku app name.
  • Go to the Square Application Dashboard and select your application.
  • Copy the Personal Access Token from the Credentials tab into the ACCESS_TOKEN field of the Heroku configuration page.
  • Click Deploy app
  • Copy https://[Heroku app name].herokuapp.com/chargeForCookie as your URL to POST to in your mobile application.

Example curl request you can make to the server:

curl -X POST 'https://[Heroku app name].herokuapp.com/chargeForCookie' \
  -H 'Content-Type: application/json' \
  -d '{ "nonce": "INSERT_YOUR_NONCE_HERE" }'

About

Square Payments Integration & Transaction Test

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published