- Introduction
- Requirements
- Configuration
This module integrates Drupal Commerce with Wise Quick Pay, https://wise.com/p/business/quickpay
- Offsite payment gateway in Drupal Commerce core.
- Webhook integration for real time updates.
- Payments in Drupal Commerce synchronized with Wise.com.
The buyer is sent to a Wise Quick Pay link for the order's balance, with the order number as the payment reference. Wise's balance update webhook then reports each deposit:
- Only money coming in counts. Debits, test notifications and deposits whose reference names no order are acknowledged and ignored.
- A deposit is recorded once, as a completed payment whose remote ID is the deposit's Wise step ID. Wise's retries of a notification change nothing.
- A deposit in another currency than the order's is not recorded; it is logged for you to settle.
- The order is placed when the deposit covers what the pay link asks for, as the checkout places it when an off-site payment returns. A smaller deposit is recorded and the order stays in checkout; a new pay link asks for the rest.
- A deposit for an order placed before, such as an instalment, only adds a payment.
Two events let a site change this:
commerce_wise.quick_pay_link(QuickPayLinkEvent): the reference and amount of the pay link, for example a down payment instead of the balance. The amount a deposit must cover to place the order is this one too.commerce_wise.quick_pay_reference(QuickPayReferenceEvent): which order a deposit's reference names, or none.
This module should be added to your codebase via Composer
composer require "drupal/commerce_wise:^1.0"
There are no other requirements than Commerce Core 3
You must also have a Wise business account to configure for your integration. You can sign up for one here.
Once you've installed the module, you must navigate to the Drupal Commerce payment gateway configuration screen to define a payment gateway configuration. This will require providing a Wise public key, Wise tag of Wise.com business account and configuring the mode (Live vs. Test).
- Log into you Wise Business account.
- Go to
Integration & Tools => Webhooks - Create new Webhook of type
Account deposit events- Enter any name
- Under URL enter
https://yourwebsite.com/payment/notify/machine_name_payment_gateway- Replace
machine_name_payment_gatewaywith machine name of payment gateway which you created in Drupal
- Replace
Optional. It goes before the order number in the payment reference, for
example SHOP-42, and a deposit whose reference lacks it is not matched to an
order. Every deposit to a Wise account reaches every webhook on it: when
several sites share one Wise account, give each site its own prefix, so one
site's order 42 is not paid by another's.
- Go to https://docs.wise.com/api-docs/webhooks-notifications/event-handling#requests
- Copy either sandbox or production key, depending on how the payment gateway mode is configured.
- Log into you Wise Business account.
- Go to
Security & Privacy => Contacts discoverability - If there is no tag yet, create new one.