Testing payment extension
Prerequisites
- You have created a partner organization on Fynd Partners.
- You have created a development account in your partner organization and populated it with sample data.
- You have registered a payment extension in your partner organizaton.
- You have implemented the installation and activation flow in your extension.
Testing installation and activation flow
- Go to Fynd Partners.
- Click Accounts.
- Accounts screen will appear.
- Open desired development account. Here, we are selecting Self Ship.
- The development account opens.
- Go to sales channel (also called as
application
).
- Click Settings.
- Go to Payments in the Cart & Payment section.
- Open General Payments.
- Click Add Payment Gateway.
- The list of available payment gateway will appear.
- Select the payment gateway to be tested. Here, we are selecting checkout_logo.
- Click Install. Your extension should receive a request on
{Extension URL}/fp/install
URL. It should handle it as explained in installation and activation guide.
- Click Accept and Continue.
- Your extension should redirect to its home page for this application where it should show a form to collect merchant payment gateway credentials. Enter test credentials to continue.
- Click Submit.
- Now go back to Sales Channel -> Settings -> Payments -> General Settings. When you go on this page, your extension should received getActivationReadiness API call. If it has collected the Payment gateway credentials for the application, it should respond with success. Upon getting success as
true
response, the payment extension is shown asInactive
in payment settings page and can be activated by merchant as explained in next step. If your extension responds with success asfalse
in getActivationReadiness API call then your Payment Extension is shown asAvailable for activation
in payment settings page.
- Open your payment gateway extension.
- Toggle on to activate your payment extension.
- Click kebab menu as shown in the image below.
- Click Active.
- Click Save.
- Your extension is now active on the storefront.
Testing Payment flow
-
After you have activated your payment extension in an application in a company, open the application website by clicking view icon as shown below.
-
Your application website opens. Now register and sign in.
-
Go to a product, add it your cart and checkout.
-
Verify that payment flow works.
Testing Refund flow
- On your application website, click profile -> My Orders. You would see list of all the orders placed by you.
-
Cancel an order and check that your extension should receive initiateRefundSession call.
-
Check that you are able to process refund for the cancelled order.