storefront
storefront copied to clipboard
add: dummy payment provider
Features:
-
pages/api/dummy-pay.ts
- API endpoint for dummy payment (creates a transaction) - integrating the new payment method
dummy
into the existing structure (e.g.pages/api/pay.ts
) - added
checkout-storefront/src/views/DummyPayment.tsx
view with a simple form that lets you pay either the entirety or a fraction of the order's total price - added the
Views
component inRoot.tsx
, as there are now three views that can be displayed:Checkout
,OrderConfirmation
, andDummyPayment
.DummyPayment
's URL is:host/checkout?order=:orderId&dummyPayment=true
.
Media:
https://user-images.githubusercontent.com/44495184/193268382-4796058f-7378-4f9f-996a-3f5ccb047aca.mov
Questions:
- How do we restrict access to the dummy payment provider? Currently, it's turned on by default. Should we add an env var like
IS_DUMMY_PROVIDER_ON
set tofalse
by default?
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated |
---|---|---|---|---|
react-storefront | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Oct 12, 2022 at 2:03PM (UTC) |
saleor-app-checkout | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Oct 12, 2022 at 2:03PM (UTC) |
saleor-checkout | ✅ Ready (Inspect) | Visit Preview | Oct 12, 2022 at 2:03PM (UTC) |
1 Ignored Deployment
Name | Status | Preview | Comments | Updated |
---|---|---|---|---|
saleor-checkout-ui-kit | ⬜️ Ignored (Inspect) | Oct 12, 2022 at 2:03PM (UTC) |
How do we restrict access to the dummy payment provider?
After a conversation with @witoszekdev, I think the best way would be to include the Dummy Payment in the Dashboard configuration UI (same as the rest of the payment providers). I will add it tomorrow.
Added the ability to select the payment provider from the configuration. @witoszekdev @mmiszy
@witoszekdev merged your suggestion & rebased. Please approve & merge if all is good.
@mmiszy please merge if all is good