The SHVA testing environment is unstable and can produce irregular transaction results.
Instead, we devised the following steps to replicate the SHVA flows using the Mock Provider.
Read more about SHVA to understand the correct payment flow with this provider:
- What is SHVA? How do I process online payments in Israel?
- Why is my payment in Pending status?
- Through which SHVA terminal a transaction is sent (CVV or non-CVV)?
- What's the difference between synchronous and asynchronous payment flows?
Please also review the PaymentsOS SHVA integration guide.
SHVA flow simulation using the PaymentsOS Mock Provider-
To use the PaymentsOS Mock Provider to simulate SHVA testing flows, we recommend following and reviewing the below instructions when integrating to PaymentsOS.
The general SHVA flow:
SHVA supports both available payments flows in PaymentsOS: Charge and Authorization+Capture.
You can decide which of the following will be better suited for your business needs:
Charge flow - 1-step charging payment flow-
-
-
-
- Create Token
- Create Payment
- Create Charge >
- Step 1 - Synchronous response, will be returned immediately if the transaction is successful or not (can be also pending).
- Step 2 - The Capture phase will be an automated step inside the Charge request > Asynchronous response, the payment will be under "Pending" status until after the SHVA nightly batch (3-4 AM, local IL time, depends on daylight savings).
-
-
*considering all responses are successful.
Authorization+Capture flow - 2-step charging payment flow-
-
-
-
- Create Token
- Create Payment
- Create Authorization > Synchronous response, will be returned immediately.
- Create Capture > Asynchronous response, the payment will be under "Pending" status until after the SHVA nightly batch (3-4 AM, local IL time, depends on daylight savings).
-
-
*considering all responses are successful.
To replicate these flows, you can use the Mock provider Reference:
- Making the Authorization request to return an immediate successful/failed response, AKA synchronous response (disregard the Pending then Succeed/Faild options).
- Making the Capture request to return a successful/failed response, and set the payment to get a "Pending" status, AKA asynchronous response (disregard the immediate Succeed/Failed options).
- *This method applies to also to Refund requests, as in SHVA Refunds are asynchronous as well.
- Making the Charge request to return a successful/failed response, and set the payment to get a "Pending" status, AKA asynchronous response (disregard the immediate Succeed/Failed options).
- Void requests in SHVA are immediate and synchronous - be advised that you can only Void a transaction if it's Authorized. If it's Captured, you may only Refund it (disregard the Pending then Succeed/Faild options).
- When using Charge requests, you may Void the request as long as it's pending. If it was already Captured, you can only Refund it.
Status Change from Pending to Succeed or Failed
The mock provider takes approximately 10 seconds to change status from Pending to either Succeed or Failed. A webhook will respond within seconds of the status change to inform you that a change in status has occurred.
Simulating Request Response Errors
In this section, we recommend testing all of the available cases, and to focus especially on errors 06 to 11 (these are not the actual response codes, but rather the values that will trigger the specified errors).