This module enables the use og the Blink Payment Gateway, utilising the Blink REST API, using the Woocommerce project. The documentation for the Blink API cna be found here. The API credentials can be found on your Blink Portal
Note: Please don't use any style tag in to that text area.
Two hooks are provided, if a developer wants to hook into the plugin and wants to inject some js and css.
'wc_blink_custom_script' and 'wc_blink_custom_style'
add_action('wc_blink_custom_script', function(){
wp_enqueue_script('custom script handler');
});
add_action('wc_blink_custom_style', function(){
wp_enqueue_style('custom style handler');
});
https://developer.wordpress.org/reference/functions/wp_enqueue_script/
https://developer.wordpress.org/reference/functions/wp_enqueue_style/
Following js files need to be added in payment form page
assets/js/custom.js
hostedfields.min.js is required to tokenize the card details and create a paymentToken value on blink server which will be auto added in the payment form through this js file.
custom.js is required to initiate the hosted js and also add some required values regarding browser settings for 3DS authentication.
Headers:
Content-Type string
Content type is JSON.
Attributes:
'transaction_id' string
Transaction id.
'status' string
The new status of the transaction.
'note' string
Notification note.
'merchant_data' json
JSON string of all the optional data sent by the merchant.
POST http://my_domain/wc-api/wc_blink_gateway/ HTTP/1.1
Content-Type: application/json
{
"transaction_id": "BL-****",
"status": "Captured",
"note": "Status changes to Captured",
"merchant_data": {
"order_info":
{
"order_id":195,
}
}
}