Skip to content

Latest commit

 

History

History
101 lines (64 loc) · 4.14 KB

README.md

File metadata and controls

101 lines (64 loc) · 4.14 KB
saleor-app-template

Dummy Payment App

Bare-bones app for testing Saleor's Transactions API

Tip

Questions or issues? Check our discord channel for help.

What is Dummy Payment App?

The Dummy Payment App allows you to test Saleor's payment and checkout features without needing to set up a real payment provider. You can create orders, process payments, issue refunds, and more, all within the Saleor Dashboard.

App features

  • Create new checkouts and orders from the Saleor Dashboard:

Dummy Payment App has UI in Saleor dashboard for creating new orders from checkouts with Transactions

  • Process payments and update transaction statuses:

Dummy Payment App has UI in Saleor dashboard for updating Transactions

Tip

Each Transaction has externalUrl that links to this page from Order details page in Saleor Dashboard:

  • Issue refunds, process charges and cancellations for Transactions

How does it work?

The Dummy Payment App supports the following webhooks to enable payment flows:

The app implements webhooks to process payments initiated from your storefront:

  • PAYMENT_GATEWAY_INITIALIZE_SESSION
  • TRANSACTION_INITIALIZE_SESSION
  • TRANSACTION_PROCESS_SESSION

It also implements webhooks to allow updating the status of Transactions from the Saleor Dashboard, similar to how a real third-party payment provider would:

  • TRANSACTION_REFUND_REQUESTED
  • TRANSACTION_CHARGE_REQUESTED
  • TRANSACTION_CANCELATION_REQUESTED

How to use the app?

After installing the app in Saleor, visit the app's Dashboard.

There you can create a Checkout, a set shipping method on that checkout. After that step is completed you can initialize a Transaction using transactionInitialize mutation. App's response to that mutation can be modified using provided input.

The checkout process in app looks like this:

  1. Select channel where you want to create the Checkout
  2. Click "Create checkout" to create Checkout in Saleor in your selected channel
  3. Click "Set delivery" to set delivery method on that checkout
  4. Set response you want the app to return for TRANSACTION_INITIALIZE_SESSION
  5. Click "Initialize transaction"
  6. Wait until response is returned and click "Complete checkout" to send checkoutComplete mutation

Learn more

Docs

Examples

Development

You can find docs about App development in the Saleor documentation.

Support

Please open GitHub issues if you find any problem with this app. PRs are welcome too 😄

You can find help with Saleor in these places:

Credits