# Test and Deploy
# Testing
You will need to create an adapter and perform tests with it on the ST or CI environment first. Once it is tested and approved, then the adaptor can be deployed to the production.
In order to test the adaptor, you need following :
Create a test merchant account
Set up a test terminal under the test merchant (Make sure you have the right O.S and right configuration file)
Create the Lego adaptor
Assign the adaptor to your merchant
Perform a transaction with a test card or L3 test case
Go to Logs screen in Lego adaptor and enter the Request id of the transaction
You can see the transaction details as below
The transaction details show operations and controls performed in the Poynt Cloud step by step. It shows the Transaction Request, any Poynt error(s) (see Poynt Cloud Error Codes section), any error(s) during Adaptor processing, acquirer request and response messages, EMV data and many more. When you click on any item, it shows the details of it.
When you click ApiMetric item, you can see more basic information about transaction such as Error Code, Entry Mode, transaction status, pin exists and card type.
# Catching Adapter Errors
When there is a mistake in the adapter, you can see it in transaction details screen as shown below.
When you click the ApiMetrics, you will see error codes and more details as below. devErrorMsg shows the description of the error.
# Poynt API Error codes
HTTP STATUS | Error Code | Error Message |
---|---|---|
400 | STORE_DEVICE_ALREADY_REGISTERED | "Store device already registered with a different store." |
400 | STORE_DEVICE_ALREADY_ACTIVATED | "Store device already activated." |
400 | STORE_DEVICE_UNVERIFIED | "Store device failed verification." |
400 | BUSINESS_ALREADY_EXISTS | "The business already registered in our system." |
400 | CREDENTIAL_ALREADY_EXISTS | "The credential already exists." |
400 | CARD_ALREADY_EXISTS | "The card already exists." |
400 | BAD_CARD_DATA | "The card data provided is invalid or incomplete." |
400 | TXN_ALREADY_CAPTURED | "The transaction has already been captured." |
400 | CAPTURE_NOT_ALLOWED | "The transaction can't be captured." |
400 | TXN_ALREADY_REFUNDED | "The transaction has already been refunded." |
400 | TXN_ALREADY_VOIDED | "The transaction has already been voided." |
400 | DEVICE_ALREADY_PRESENT | "The device is already present." |
400 | ORDER_UUID_ALREADY_EXISTS | "The Order UUID already exists and is too old." |
400 | REQUEST_ID_DUPLICATE | "The Poynt-Request-Id has already been processed." |
400 | REQUEST_IN_PROGRESS | "The Poynt-Request-Id is currently being processed." |
400 | ORDER_ALREADY_COMPLETED | "The Order has already been marked as completed." |
400 | TXN_DUPLICATE | "We have detected a transaction that might be duplicate." |
400 | TXN_ALREADY_EXISTS | "The transaction already exists." |
400 | NO_SESSION_KEY_RETURNED | "No Session Key was returned." |
500 | DATABASE_ERROR | "System error." |
500 | INTERNAL_ERROR | "System error." |
400 | ATLEAST_ONE_TXN_FAILED | "Order cancelled as at least one of the transactions failed." |
400 | PROCESSOR_DECLINED | "Processor declined." |
400 | PROCESSOR_TIMEOUT | "Processor call timed out. A request to cancel this has already been issued." |
400 | PROCESSOR_DETECTED_DUP | "Processor detected duplicate txn. If this is not duplicate, please retry after 6 minutes." |
502 | PROCESSOR_SIGNON_FAILED | "Processor sign-on failed; typically retriable." |
504 | EXTERNAL_SERVER_CONNECT_FAILURE | "Could not connect to external server." |
504 | EXTERNAL_SERVER_READ_TIMEOUT | "Call to external server timed out. If this was payments related operation, a request to cancel this has already been issued." |
502 | EXTERNAL_SERVER_ERROR | "Unknown error from the server." |
400 | CUSTOM_FUNDING_ERROR | "There was a problem processing the custom funding source." |
417 | CUSTOM_FUNDING_VERIFICATION_REQUIRED | "Funding source verification required." |
400 | MISSING_PARAMETER | "Required parameter is missing." |
404 | STORE_DEVICE_NOT_FOUND | "Store device not found in our records." |
404 | BUSINESS_AGREEMENT_NOT_FOUND | "Business agreement not found in our records." |
404 | BUSINESS_NOT_FOUND | "Business not found in our records." |
400 | BUSINESS_NOT_SETUP | "Business is not fully setup." |
400 | ACQUIRER_NOT_SETUP | "Acquirer is not fully setup." |
404 | CARD_NOT_FOUND | "Card not found in our records." |
404 | ORDER_NOT_FOUND | "Order not found" |
404 | CUSTOMER_NOT_FOUND | "Customer not found in our records." |
400 | MULTIPLE_CARDS_MATCHING_PAN | "Multiple card found matching PAN." |
400 | TXN_NEVER_PROCESSED | "Transaction processing was started but never completed" |
404 | APPLICATION_NOT_FOUND | "Application not found in our records." |
404 | TRANSACTION_NOT_FOUND | "Transaction not found" |
404 | KEY_NOT_FOUND | "Key not found" |
400 | CAPTURE_EXCEEDS_PREAUTH_BAL | "Capture total exceeds pre-auth balance on card" |
400 | INVALID_PARAMETER | "Parameter provided is invalid." |
400 | CANCEL_UNSUPPORTED_ON_MODIFIED_ORDER | "Order cancel currently not supported on orders that have been modified" |
404 | INVALID_URL_PATTERN | "Url pattern is invalid." |
401 | LOGIN_FAILED | "Login failed." |
400 | UNSUPPORTED_TXN_TYPE | "Transaction type is unsupported." |
400 | UNSUPPORTED_TXN_ACTION | "Transaction action is unsupported." |
401 | INVALID_ACCESS_TOKEN | "Access token is missing or invalid." |
401 | INVALID_REFRESH_TOKEN | "Refresh token is missing or invalid." |
400 | INVALID_REQUEST | "Bad request." |
401 | UNAUTHORIZED_ACCESS | "Access not authorized for the requested resource." |
404 | INVALID_RESOURCE_ID | "The requested resource does not exist." |
400 | ITEM_NOT_FULFILLED_OR_RETURNED | "Order should probably not be completed as there are items that are neither fulfilled, nor returned." |
400 | ORDER_TXN_RECON_FAILED | "Order should probably not be completed as funds received do not match with funds expected for this order." |
409 | RESOURCE_MODIFIED | "The resource was modified. Please re-get the resource before proceeding." |
404 | RESOURCE_NOT_FOUND | "Cannot find the resource." |
400 | WEBHOOK_UNDELIVERABLE | "Cannot deliver the web hook." |
499 | BROKEN_PIPE | "The client closed the connection before response transmission finished." |
400 | UNSUPPORTED_OPERATION | "The operation is not supported." |
403 | STORE_DEVICE_NOT_ACTIVATED | "Store device has not been activated." |
403 | APPLICATION_NOT_ACTIVATED | "Application has not been activated." |
503 | RKMS_UNAVAILABLE | "Failed to communicate with the RKMS service." |
504 | SERVICE_UNAVAILABLE | "Failed to communicate with the upstream service." |
401 | INVALID_ACCESS_TOKEN_SIGNATURE | "Failed to validate JWT signature." |
401 | INVALID_ACCESS_TOKEN_KEY | "Access token signing key does not match." |
500 | FAILED_TO_UNLOCK_BATCH_STATE | "Close Batch : Failed to unlock the Batch State, for empty txns" |
500 | FAILED_TO_GEN_SETTLEMENT_PAYLOAD | "Close Batch : Settlement payload generation failed" |
500 | BATCH_NOT_FOUND_FOR_QD | "Close Batch : No failed batch found to recover from QD error" |
504 | FAILED_TO_CONNECT_ACQUIRER | "Close Batch : Failed to connect Acquirer"); |