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 #
On the front-end of your app, you will need to collect:
- Cardholder Name (text)
- Card Number (13-16 digits)
- Expiry Month (2 digits)
- Expiry Year (2 digits)
- CSC (or, CVN or CVV/2) (3-4 digits) – OPTIONAL
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: Add Card” action from the “Plugins” tab of the Actions list.
Each parameter in the action settings matches a parameter in the Merchant Warrior documentation.
cardName #
This must contain at the very least a space and no less than two characters. Only alphanumeric characters, hyphens, spaces and full stops are allowed.
Example: Mr. Example Person or MR E PERSON or Example Person
Valid length: Between 3 and 255 characters
cardNumber #
Example: 5123456789012346 or 4557012345678902
Valid length: Between 13 and 16 digits
cardExpiryMonth #
This must be MM format. The month must be zero padded if it is less than 10.
Example: 05
Valid length: 2 digits
cardExpiryYear #
This must be YY format.
Example: 13
Valid length: 2 digits
paymentCardCSC #
This is also known as the CVN or CVV/2. If you are verifying the card number during your request we highly recommend you submit this value in your request.
Example: 123
Valid length: Between 3 and 4 characters
verifyCard #
This parameter is used to indicate if the card details (cardNumber, cardExpiry and optionally the paymentCardCSC) should be verified automatically before being tokenized. Its value must be 0 or 1.
Example: 1
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.
cardID #
You’ll use this in future calls relating to this card – store this in a Thing.
cardKey #
We don’t use this in this plugin, but if you plan to use it in another integration, store it in a Thing.
ivrCardID #
If you use Merchant Warrior’s IVR Payment solution, this number can be used by your end-user in place of full card details when paying via the IVR.
cardNumber #
Sanitised card number, eg. 411111XXXXXX1111 – we recommend storing this in a Thing so you can identify the card to your end-user.
If you selected verifyCard #
authCode #
6-digit receipt code for the verification action
authMessage #
Response to card verification, eg. “Approved”
authResponseCode #
Authorisation response code as per Merchant Warrior’s documentation. Anything other than 0 is a fail.
Next Actions #
We’ve included some recommendations throughout the above, as to storing data in a Thing.
If you selected verifyCard #
We recommend adding a step with an “only when” of “…’s authResponseCode is not 0” that deals with the error.
If you did not select verifyCard #
We recommend adding a step with an “only when” of “…’s responseCode is not 0” that deals with the error.