Before you start #
On the Plugin settings page, make sure you’ve entered your Merchant UUID and API Key – these can be found on the Settings page in Barracks. You’ll also need to enter your Endpoint – see the Setup page for information.
Collect Data #
You will need to collect:
- Transaction ID of the original transaction
- Transaction Reference ID – OPTIONAL
- Hash – we’ll cover how to generate this below
- Transaction Amount of the original transaction
- Transaction Currency of the original transaction
- Refund Amount
We recommend storing the expiry month and year in a Thing directly from the input fields when parsing the response, as they are not passed back by Merchant Warrior. This will help with managing expiring cards.
Create a Workflow #
Create a Workflow, and add the “MW – Token Payments: Process Card” action from the “Plugins” tab of the Actions list.
Each parameter in the action settings matches a parameter in the Merchant Warrior documentation.
The transactionID returned for the initial transaction.
This is a merchant’s unique reference ID for a transaction sent to Merchant Warrior. The main purpose of this ID is to verify the transaction via the Query Card method in the event a valid response is not received.
Valid length: Up to 40 characters
This amount must be the exact amount submitted with the initial transaction. This is used in the verification hash, and is not the amount that will be refunded.
One of the following: AUD, CAD, EUR, GBP, JPY, NZD, SGD, USD. This is provider dependent. Please check with MW before attempting to process transactions in any currency other than AUD. This field is case insensitive.
The amount is in the same format as transactionAmount. It cannot be less than 0.01 or more than the initial transaction amount.
Parse Response #
The response will contain:
|< 0||MW validation error|
|0||Transaction/Operation was successful|
|> 0||Transaction/Operation was declined or delayed by the provider or service|
If the responseCode is not 0, this will provide basic insight into the reason for failure.
Long-form string with the ID of the overall transaction.
6-digit authorisation code
Receipt number for the payment
Response to refund request, eg. “Approved”
Authorisation response code as per Merchant Warrior’s documentation. Anything other than 0 is a fail.
The date this refund will settle out of your bank account to Merchant Warrior.
As entered in this transaction.
As entered in the original transaction.
Custom Hash as generated by Merchant Warrior.
Sanitised card number, eg. 411111XXXXXX1111 – useful for receipts.
The same amount/format posted in this request.
The applicable Merchant Warrior fee for this transaction.
The type of card used, rendered in lowercase. eg. visa
2-digit expiry month.
2-digit expiry year.
Next Actions #
We recommend adding a step with an “only when” of “…’s authResponseCode is not 0” that deals with the error. Otherwise, passing the variables you need to a Thing and/or to an Element, would be the logical next step.