Skip to content

goldcoders/bux.ph-checkout

Repository files navigation

Bux.ph Checkout API

Use With Thriftshop Site as a Serverless Function

Requirements

  • netlify-cli
  • postman

Development

  • Clone this Repo
git clone https://github.com/goldcoders/bux.ph-checkout
cd  bux.ph-checkout
  • Edit ENV: cp .env.example .env anad edit .env

  • Install Any NPM Dependencies type: yarn

  • Run Local Server: netlify dev

  • open postman and set url to http://localhost:8888/api method: POST

  • Add Raw JSON

{
    "amount": 1234,
    "description": "GOLDCODERS CORP. - MERCHANT CHECKOUT VIA BUX.PH ",
    "email": "[email protected]"
    "contact": "9111111111",
    "name": "Hugo Dusk"
}
  • Click Send, Receive the Response
Response JSON
{"status":"success","id":7576,"uid":"c40d23d18bf94acaa1ba06f339792a7b"}
  • uid: can be use to generate link
  • production checkout link: https://bux.ph/checkout/c40d23d18bf94acaa1ba06f339792a7b
  • test checkout link: https://bux.ph/test/checkout/c40d23d18bf94acaa1ba06f339792a7b

1 Click Install For Production

Deploy to Netlify

Deploy on One Specific Site URL in Production

  • Go to Settings

  • Click Change Site Name bux.ph-checkout.${yourdomain}.com

Production

  • make post request with Needed payload to bux.ph-checkout.${domain}.com/api