mythrnr / paypay-sample-ecommerce-backend-go

Sample repository to use PayPay Open Payment API SDK for Go.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go SDK Implementation

日本語

Install Requirements

go mod tidy

Add API Keys to environment

export API_KEY="REPLACE_WITH_YOUR_API_KEY"
export API_SECRET="REPLACE_WITH_YOUR_SECRET_KEY" 
export MERCHID="REPLACE_WITH_YOUR_MERCHANT_ID"

Run local Go server

make serve

You should now have the dev server running on http://localhost:5000

⚠️ NOTICE: If you run on Mac OS Monterey, you need to change port or turn off AirPlay receiver.

CLI to Refund Operation

  • Additional, this repository has command for refund.
  • Order ID is picked from Transaction List.
make refund

Enter Order ID issued by PayPay to refund: 000000000
Enter refund amount: 100

Requirements

  • Go 1.20 or above.
  • Docker (for Development)

About

Sample repository to use PayPay Open Payment API SDK for Go.

License:MIT License


Languages

Language:Go 88.1%Language:Makefile 11.9%