Can you build a payment extension of Magento 2 for GoPaywin. Here is the PHP SDK https://github.com/GoPayWin/api-client-php
Plug-in will use PHP SDK and create a Order at GoPayWin calling the Order API. In response to calling Order API, system will receive Order object which will have 2 important information
1. Order ID of GoPayWin
2. The payment redirect URL in “links” section
The Order Information (Magento and GoPayWin) will be saved in custom table for all further reference.
On receiving order information after the API call, system will send Magento’s order items to GoPayWin order with reference of the Order ID received in response to order creation in Step 1. The price of Order Items will always be in cents x 100. Also if any coupon is used the coupon code and discount value (negative value) will be sent as order item.
On completion of step 2, customer will be redirected to the payment URL received in step 1 from “links” section where “rel=checkout”
Customer will now login to GoPayWin site and make payment or cancel order, during this process gateway is suppose to make various callbacks to Magento app sending the current status. These callbacks will be done by gateway’s webhooks.