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:
- Currency (3-letter code)
- Amount (as a decimal number – we recommend collecting/storing this as a “currency” field)
- Transaction Product (sale/payment reference) (text)
- Card ID (you’ll want to return this from a Thing)
- Customer Name (text)
- Customer Address (text)
- Customer City (text)
- Customer State (text)
- Customer Country (2 letters)
- Customer Postcode (4-10 characters)
- Customer Phone (up to 25 numbers) – OPTIONAL but recommended
- Customer Email (text) – OPTIONAL but recommended
- Customer IP (up to 39 characters) – OPTIONAL but recommended
- Hash – we’ll cover how to generate this below.
- Custom 1/2/3 – OPTIONAL
- Transaction Reference ID – OPTIONAL
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.
transactionCurrency #
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.
Example: AUD
transactionAmount #
We recommend passing this from a “currency” field, then entering it as dynamic data “formatted as:” “number”, to 2 decimal places, with a period for the decimal and no symbol for the thousands. Have a look at how we pass the value to the Hash in this step for a reference.
The amount must be formatted to have two decimal places. Any amounts without two decimal places or amounts less than one cent will be rejected.
Example: 10.00
transactionProduct #
A product (or sale) id or description. We recommend using an order/product id. This field’s primary purpose is to help the transaction be identifiable for reporting and accounting purposes. Example: ABC4321 Valid length: Up to 255 characters. Some Acquirers limit this field to 40 characters.
cardID #
A unique alphanumeric string returned by the Add Card action, used to identify a specific card.
Example: NUFM56937091
customerName #
This field can only contain alphanumeric characters, as well as the full stop, comma, apostrophe, ampersand, space and hyphen characters.
Example: Mr. Example Person
Valid length: Between 2 and 255 characters
customerAddress #
Freeform field.
Example: 123 Test Street
Valid length: Up to 255 characters
customerCity #
Freeform field, keep consistent for your records and reporting.
Example: Brisbane
Valid length: Up to 75 characters
customerState #
Freeform field, keep consistent for your records and reporting.
Example: Queensland
Valid length: Up to 75 characters
customerCountry #
Two letter ISO 3166-1 alpha-2 country code.
Example: AU
Valid length: 2 characters
customerPostCode #
This can also accommodate ZIP/Post codes for international transactions.
Example: 4000
Valid length: Between 4 and 10 characters
customerPhone #
Optional, but highly recommended.
Anything other than +,-, space and 0-9 will be stripped.
Example: 0401234567 or 61731234567
Valid length: Up to 25 characters
customerEmail #
Optional, but highly recommended.
Example: person@example.com
Valid length: Up to 255 characters
customerIP #
Optional, but highly recommended.
Any valid IPv4 or IPv6 address is accepted.
Example: 123.456.789.012 or 2001:0db8:85a3:0000:0000:8a2e:0370:7334
Valid length: Up to 39 characters
hash #
custom1/2/3 #
These fill the Custom1, Custom2, and Custom3 fields in Barracks – they’re optional.
Freeform fields.
Valid length: Up to 500 characters each
transactionReferenceID #
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.
Example: A257240023321
Valid length: Up to 40 characters
Parse Response #
The response will contain:
responseCode #
Code | Meaning |
---|---|
< 0 | MW validation error |
0 | Transaction/Operation was successful |
> 0 | Transaction/Operation was declined or delayed by the provider or service |
responseMessage #
If the responseCode is not 0, this will provide basic insight into the reason for failure.
transactionID #
Long-form string with the ID of the overall transaction.
authCode #
6-digit authorisation code
receiptNo #
Receipt number for the payment
authMessage #
Response to card verification, eg. “Approved”
authResponseCode #
Authorisation response code as per Merchant Warrior’s documentation. Anything other than 0 is a fail.
authSettledDate #
The date this payment will settle into your bank account from Merchant Warrior.
transactionReferenceID #
The same format posted in the original request.
custom1/2/3 #
The same format posted in the original request.
paymentCardNumber #
Sanitised card number, eg. 411111XXXXXX1111 – useful for receipts.
transactionAmount #
The same amount/format posted in the original request.
feeAmount #
The applicable Merchant Warrior fee for this transaction.
cardType #
The type of card used, rendered in lowercase. eg. visa
cardExpiryMonth #
2-digit expiry month.
cardExpiryYear #
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.