Is there a test mode for 2pay.js? I'm trying to build an integration and getting an error that my transaction is forbidden, which leads me to believe I unfortunately need to wait for them to review a SAQ-A questionnaire to give me test access... But perhaps there's a magic incantation I'm just missing.
We have an account in demo mode.
{
"error_code": "FORBIDDEN",
"message": "You need to contact support in order to have this feature enabled"
}
Here is the request we are submitting:
curl --location --request POST 'https://api.avangate.com/rest/6.0/orders/' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-Avangate-Authentication: code="xxx" date="2020-03-24 23:52:45" hash="yyy"' \
--data-raw '{
"BillingDetails": {
"FirstName": "Joe",
"LastName": "Sullivan",
"Address1": "123 Easy St",
"City": "Anywhere",
"State": "GA",
"Zip": "70403",
"CountryCode": "US",
"Email": "[email protected]"
},
"Currency": "usd",
"ExternalReference": "REST_API_AVANGTE",
"Items": [
{
"Code": "xxx",
"Quantity": "1"
}
],
"Language": "en",
"PaymentDetails": {
"Currency": "USD",
"PaymentMethod": {
"EesToken": "190f2d9c-0bbc-4ad0-a902-770adb8e7f90"
},
"Type": "EES_TOKEN_PAYMENT"
}
}'
They are telling me that I have to use the TEST type, but that results in an error about the PaymentMethod being empty:
{
"error_code": "ORDER_PAYMENT_METHOD_INVALID",
"message": "The payment method [] is not supported."
}
I'm pretty confident that the TEST type only has to do with using actual card data in the PaymentMethod just like you would with the CC type.
Anyone know if there's a way to test token payments with 2pay.js?
curl.