WooCommerce
Technical manual for MultiSafepay's free plugin.
Prerequisites
- MultiSafepay account
- Wordpress 5.0 or higher
- PHP 7.3 or 7.4
Installation
Ā š” Tip! We recommend first installing the plugin in a test environment, following the WooCommerce installation procedure. Always make a backup.
There are two ways to install the plugin:
Wordpress installation
- Sign in to your WooCommerce backend.
- Go to Plugins > Add new.
- Search for MultiSafepay.
- For the MultiSafepay plugin for WooCommerce, click Install now > Activate.
Manual installation
- Click the Download button above.
- Sign in to your WooCommerce backend.
- Go to Plugins > Add new.
- Click Browse file.
- Upload the Plugin_WooCommerce_x.x.x.zip file.
Configuration
- Sign in to your WooCommerce backend.
- Go to WooCommerce > MultiSafepay settings
- On the Account tab, enter your API key.
- On the Order status tab, confirm the match between WooCommerce order statuses and MultiSafepay order statuses, and then click Save changes.
- On the Options tab, confirm your settings, and then click Save changes.
- Go to WooCommerce > Settings > Payments.
- Enable the relevant payment methods and confirm the settings.
User guide
Languages
MultiSafepay payment pages and messages to customers (e.g. Second Chance emails, links, order confirmations) are supported in several languages.
However, WooCommerce only supports the language of your ecommerce platform, irrespective of the customer's language or country, or the language of the webshop (if you use a third-party plugin for a multi-lingual webshop).
How to change language
The plugin sets the language for payment pages and messages based on the Wordpress locale code get_locale()
function.
To change this behavior, use the multisafepay_customer_locale
filter hook in our plugin.
Ask your developer to read WordPress Developer Resources - Filters in Wordpress .
Example implementation:
add_filter('multisafepay_customer_locale', 'return_my_own_locale');
function return_my_own_locale($locale) {
// Your conditions and logic to return a valid locale code
return $custom_locale;
}
TranslatePress
If you use the TranslatePress plugin for translations, to configure it for payment pages, follow these steps:
- Sign in to your WooCommerce backend.
- Go to Settings > TranslatePress > Advanced.
- Scroll down and click Exclude gettext string.
- In the Domain field, enter
multisafepay
. - Click Add.
Notifications
MultiSafepay webhook
MultiSafepay uses a webhook to send you updates about orders and other notifications.
The webhook is triggered when the order status or transaction status changes, e.g. when:
- A customer completes payment.
- A customer's attempt to pay fails.
- You process a refund.
From WooCommerce version 4.7.0, notifications are sent via POST
requests, instead of GET
requests.
However, sometimes the REST endpoint used to process notifications may be blocked by a firewall at server level, or by some WordPress plugins at application level. In this case, ensure you include MultiSafepay requests on your allow list.
Order requests
How to modify order requests
To change something in an OrderRequest before a transaction is processed, use the multisafepay_order_request
filter hook in the plugin.
First, read the following:
- Wordpress ā Filters in Wordpress
- MultiSafepay GitHub ā MultiSafepay PHP-SDK
Example of how to implement and overwrite the shopping cart:
add_filter( 'multisafepay_order_request', 'return_my_multisafepay_order_request' );
function return_my_multisafepay_order_request( \MultiSafepay\Api\Transactions\OrderRequest $order_request ) {
// Your conditions and logic to return a valid order request
// Register a CartItem
$shopping_cart_items = array();
$cart_item = new \MultiSafepay\ValueObject\CartItem();
$cart_item->addName( 'The product name' )
->addQuantity( (int) 1 )
->addMerchantItemId( (string) 'SKU' )
->addUnitPrice( \MultiSafepay\WooCommerce\Utils\MoneyUtil::create_money( (float) 10.00, (string) 'EUR' ) )
->addTaxRate( '21' );
$shopping_cart_items[] = $cart_item;
// Register the CartItem in the ShoppingCart
$shopping_cart = new MultiSafepay\Api\Transactions\OrderRequest\Arguments\ShoppingCart($shopping_cart_items);
// Overwrite the ShoppingCart
$order_request->addShoppingCart( $shopping_cart );
// Overwrite the total amount of the transaction
$order_request->addMoney(\MultiSafepay\WooCommerce\Utils\MoneyUtil::create_money( 12.10, 'EUR' ));
return $order_request;
}
Payment components
The plugin supports payment components, which:
- Provide a seamless checkout experience to increase conversion.
- Encrypt customer payment details for secure processing.
- Shift responsibility for PCI DSS compliance to MultiSafepay.
Supported payment methods
- Cards: Amex, Maestro, Mastercard, and Visa
- BNPL: Pay After Delivery installments
How to activate payment components
- Sign in to your Wordpress backend.
- Go to WooCommerce > MultiSafepay settings > Payment methods >
- Select the relevant payment methods, and click Manage.
- In the Payment Type field, select Payment component.
- Click Save changes.
š¬ Support: If you're new to accepting card payments, email a request to activate them to [email protected]
ā ļø Note:* If you have a custom checkout and encounter a conflict with the payment component, the Integration Team will do their best to provide support, but we can't guarantee compatibility in all cases.
Payment links
How to generate payment links in your backend
To generate a payment link in your backend once an order is created, follow these steps:
- Sign in to your WooCommerce backend.
- Go to WooCommerce > Orders > Add order.
- For instructions to register the order details, see WooCommerce - Managing orders .
- In Order actions panel, select the Email invoice / order details to customer option.
- Click Create order.
An email is sent to the customer containing the order details and a payment link. The payment link is also available to the customer in their private account, under Orders.
Payment methods
By default, activated payment methods from your MultiSafepay account appear on the payment method list.
Supported payment methods
- Cards: All (The card number field automatically detects the type of card (e.g. Visa) as the customer enters their card number.)
š” Tip! In your settings, you can enable the function "group Credit cards" to show cards as a single payment method. - Banking methods: All, except TrustPay
- BNPL: All
- Wallets: Alipay, Apple Pay, Google Pay, PayPal
- Prepaid cards:
- Baby Cadeaubon
- Beauty and Wellness gift card
- Boekenbon
- Fashioncheque
- Fashion gift card
- Fietsenbon
- Good4fun
- Goodcard
- Gezondheidsbon
- Nationale tuinbon
- Parfumcadeaukaart
- Paysafecard
- Podium
- Sport en Fit
- VVV gift card
- Webshop gift card
- Wellness gift card
- Wijncadeau
- Winkelcheque
- Yourgift
Recurring payments
You need to activate recurring payments and then enable it in the plugin settings.
How to activate recurring payments
- Sign in to your Wordpress backend.
- Go to WooCommerce > MultiSafepay settings > Payment methods
- Select relevant card payments, and then click Manage.
- In the Payment Type field, select Payment component.
- In the Recurring payments filed, select Enabled.
- Click Save changes.
ā ļø Note: To activate recurring payments, ensure that the Payment component is enabled.
Refunds
You can process Full and partial refunds for all payment methods, except BNPL for which you can only process full refunds.
Shipping orders
For BNPL orders, after shipment, you must change the order status from Completed to Shipped. This prevents the order expiring and triggers invoicing.
If you change the order status to Shipped in your backend, the updated status is passed to your MultiSafepay dashboard automatically.
Checkouts
The plugin supports the WooCommerce checkout and is compatible with most premium themes, unless you have a custom checkout.
WooCommerce Checkout Blocks
You can use the Checkout Blocks for WooCommerce to customize your checkout.
ā ļø Note: Only redirect payment methods are supported with this checkout at the moment.
Surcharges
You can apply surcharges in the plugin when combined with a relevant third-party package.
Attention Dutch merchants
We strongly recommend not applying surcharges to BNPL methods. This is now considered providing credit under the Wet op het consumentenkrediet and article 7:57 of the Burgerlijk Wetboek, and requires a permit from the Authority for Financial Markets (AFM).
How to apply surcharges with third-party packages
Third-party packages must follow WooCommerce and Wordpress development guidelines.
Support
The Integration Team will do their best to help you install third-party packages, but we can't guarantee perfect compatibility.
Troubleshooting
Redirect URL not leading to thank you page
- possible reasons
WC_Order::get_checkout_order_received_url() =>
https://woocommerce.github.io/code-reference/classes/WC-Order.html#method_get_checkout_order_received_url
does not return correct URL, which can be caused by a third party plugin making use of the "woocommerce_get_checkout_order_received_url" filter and returning a wrong value
- possible solutions
Use the filter "woocommerce_get_checkout_order_received_url", provided by WooCommerce, and re-format into the correct value.
WooCommerce code reference
WooCommerce add filter
Updates
You can update the plugin in your backend and the CMS marketplace, or via SFTP.
How to update in your backend
Ā š” Tip! Make sure you have a backup of your production environment, and that you test the plugin in a staging environment.
- Download the plugin again above.
- Follow the Installation and configuration instructions from step 2.
Support
Contact MultiSafepay:
- Telephone: +31 (0)20 8500 500
- Email: [email protected]
- GitHub: create a technical issue
Updated about 2 months ago