What is Merchant Page 2 integration?
You can also build your own custom payment form without using default payment template provided by PayFoRT and collect customer's payment details and send it to PayFORT server for further processing.
In Merchant Page 2 integration you can have control of the form of collecting the card data. You can create your own form to collect the card data instead of filling the card information in PayFort form encapsulated in iframe while using Merchant Page 1.
Figure 1
How it works?
-
You develop your own custom payment details form that collects the card details (credit card number, expiry date, CVV).
-
Customer fills his/her payment details in the custom payment checkout page.
-
PayFORT server receives the payment details and validates the same.
-
PayFORT then sends a confirmation to your checkout page to complete the transaction which includes Token.
-
You use the token to complete the Authorization or Purchase operation.
### Difference Between Merchant Page 2.0 and Redirection
Merchant Page 2.0 allows you to design your own checkout page where you can capture and verify the details of customer's credit card. The complete process involves displaying a checkout page to the customer where they will enter their credit card details and the details would be verified by the PayFORT servers and a token would be sent back to the merchant site which can be further used for carrying out check out process.
Redirection involves authorizing a customer purchase. In this case amount for the purchase is hold for a particular period of time until it is captured or voided. If no action is taken by the merchant site then by default the amount is voided and refunded back to the card. For more details on redirection please visit the link
Integration Flow
Figure 2
Here is the Integration flow description
- The customer begins the checkout process on your website.
- Your website displays the custom payment form to collect the card’s details. Then the Customer enters the card’s details on the payment page.
- PayFORT checks the card details.
- PayFORT creates a token for the Customer transaction and sends it to the payment page.
- The merchant site sends a payment request along with the Token to PayFORT
- In case your page receives from PayFORT server a 3-D Secure URL 3ds_url, and response indicating that a 3ds check is required then:
- Your payment page redirects the Customer to the ACS to check his card enrollment.
- The Customer enters authentication data on the ACS platform.
- The ACS performs authentication of the Customer’s data and sends the authentication results to PayFORT.
- PayFORT completes the operation based on the 3-D Secure response and returns the response to your payment page.
- PayFORT sends the payment results to your site.
How to add the Tokenization service on the Merchant Page 2.0 channel?
The Tokenization service is applicable to be integrated through the Merchant Page 2.0 Channel through the below steps: 1. The Customer processes the first PURCHASE/ AUTHORIZATION payment successfully. 2. You will receive a token_name in the response. This token_name should be considered as a permanent token name, and it can be used in the future customer’s payments by submitting the token_name in the next PURCHASE/ AUTHORIZATION payment with card_security_code parameter. 3. No need to open the Merchant Page to fill all the card details again in the next checkouts.
If the Customer wants to update/ delete his card, you should check Update Token section.
For more details on Tokens and Tokenization process visit the link
Give It a Try
Use one of our test cards and corresponding CVV to try out for yourself.
You can use any expiry date (mm/yy
), as long as it's in the future.
Supported Credit Cards:
- Visa
- Master Card
- AMEX
Credit Cards Not Supported:
- Diners Club
- JCB
Endpoints
Endpoints for Merchant Page is also applicable for Merchant 2 Integration. You can check the Endpoints by visiting this
Sandbox
https://sbcheckout.PayFort.com/FortAPI/paymentPage
Live
https://checkout.PayFort.com/FortAPI/paymentPage
Before you start
You need to signup for a test account or a live account with PayFORT. Once you signup you will get the access to the Backoffice.
Make sure you have your access_code
. Refer figure 3. You can find it in the backoffice, under Integration Settings Security Settings > Access Code. If you don't have an account with us yet, you can create a test account by visiting the link. You can also get started with an active account by visiting this link
Figure 3 : Uploading custom template
The Payment Page Template available in the backoffice provides you the feature to create a custom payment processing page. Refer to the figure 4. Once you upload your custom payment page our support team will validate the same.
Figure 4: Generating Access Code.
Sample Code
The following code snippet shown here is an example of the start of the payment process. You can refer to this example, replacing the supplied acccess_code
with your own. The card token will be posted via the URL specified in the form's action
attribute.
<FORM METHOD="post" ACTION="https://sbcheckout.PayFort.com/FortAPI/paymentPage" id=form1 name=form1>
<input type="hidden" name="service_command" value="TOKENIZATION">
<input type="hidden" name="access_code" value=" ">
<input type="hidden" name="language" value="en">
<input type="hidden" name="merchant_identifier" value=" ">
<input type="hidden" name="merchant_reference" value=" ">
<input type="hidden" name="card_number" value="4005550000000001">
<input type="hidden" name="expiry_date" value="2105">
<input type="hidden" name="card_security_code" value="123">
<input type="hidden" name="return_url" value="https://www.example.com">
<input type="hidden" name="signature" value=" ">
<input type="submit" value="Pay" id="" name="">
The above code snippet is an HTML based form that will post a request to PayFORT server. The request parameters are also added in the input tag of the code. However, If you are not familiar with HTML tags and forms then you can checkout this site.
The form action tag consists of the endpoints. This will come handy whenever submit action is performed on the page. Once the form is submitted the parameters provided in the form would be sent to the PayFORT server and Endpoints will serve as communication link between your page and PayFORT server.
Request Parameters
Please refer to the section Merchant Page 2 Request Parameters for request parameters.
Response Parameters
The PayFORT server will return the response in JSON format. Here is the sample response along with the parameters returned by PayFORT server.
[{
"service_command": "TOKENIZATION",
"access_code": "zx0IPmPy5jp1vAz8Kpg7",
"merchant_identifier": "CycHZxVj",
"merchant_reference": "XYZ9239-yu898",
"language": "en",
"signature": "7cad05f0212ed933c9a5d5dffa31661acf2c827a",
"token_name": "Op9Vmp",
"expiry_date": "2105",
"card_number": "400555*****0001",
"response_message": "012",
"response_code": "11012",
"status": "11",
"card_bin": "478773",
"card_holder_name": "John Smith",
"remember_me": "No",
"return_url": "http://www.merchant.com"
}]
Please refer to the section Merchant Page 2 Response for reponse parameters.
Go to Full API
Check out our full API by visiting this link
To learn more about Tokens and Tokenization process visit this link
Need further help?
Thanks for using PayFort.com. If you need any help or support, then message our support team at support@payfort.com.