@uponcommerce/api-plugin-payments
v2.0.0-beta.20
Published
## Development
Downloads
11
Readme
Payments plugin for the UponCommerce API
Development
Mollie local development
For testing out changes to the Mollie plugin locally, with a real Mollie account, follow the steps below. These steps will create an order, set Mollie as payment method, and create a payment intent link to the Mollie platform.
- Get a test api key from your Mollie dashboard: https://help.mollie.com/hc/en-us/articles/115000328205-Where-can-I-find-the-API-key-
- Create the file
packages/api-plugin-payments/.env
with contentMOLLIE_APIKEY=your-test-apikey
cd packages/api-plugin-payments
yarn dev-server:mollie
- Watch the logs for
Mollie payment link
and click the link to finalize the test payment.
You can change the order flow, payment methods and more in the file e2e/mollie-dev-server
, and restart the devserver.
Stripe local development
For testing out changes to the Stripe plugin locally, with a real Stripe account, follow the steps below. These steps will create an order, set Stripe as payment method, and create a payment secret.
- Get a test api key from your Stripe dashboard: https://dashboard.stripe.com/test/apikeys
- Use Ngrok or Localtunnel to make your localhost publicly available and create a webhook as described
- Create the file
packages/api-plugin-payments/.env
with these contents:
STRIPE_APIKEY=sk_test_xxxx
STRIPE_WEBHOOK_SECRET=webhook-secret
STRIPE_PUBLISHABLE_KEY=pk_test_xxxx
cd packages/api-plugin-payments
yarn dev-server:stripe
- Watch the logs for the link or go to
http://localhost:3050/checkout
to test the checkout.
After checkout completion you can see your payment in https://dashboard.stripe.com/test/payments/