jiteshmeniya / ipaytotal-hostedpage

iPaytotal Hosted API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iPayTotal Hosted Page

This is iPaytotal Hosted Page API documentation. In this API, users details will be sent to iPaytotal server with curl request, whereas Credit card details page will be loaded over iPaytotal server. Follow bellow steps to integrate hosted page API with iPaytotal.

## Step - 1 Using curl request.

following parameters required in hosted page.

1.) api_key
2.) response_url
4.) first_name
5.) last_name
6.) address
7.) country (must be 2 digit country code Ex.US)
8.) state
9.) city
10.) zip
11.) phone_no
12.) email
13.) currency (must be 3 digit currency code Ex. USD, EUR)
14.) amount
15.) ip_address
16.) sulte_apt_no (optional) - this value will be return in your redirect url as a query string.

1.) Send Curl request

Curl request send with bellow parameters. Some parameters are optional but we recommend to send with request. All personal details should be of credit card holders. User here used for credit card holder.

Request URL: https://ipaytotal.solutions/api/hosted-pay/payment-request

Request type: POST

Response:

After successful request, response will be sent in JSON format.

Successs Json Response type :

{
    "status": "success",
    "payment_redirect_url": "http://localhost:8000/transaction/flutterwave-checkout/form/JINS1585461334",
    "api_key": "api_key",
    "sulte_apt_no": null,
    "valid_till": "2020-03-29 07:55:34"
}

If the request data is in valid format, then above response will be sent. You will be need to redirect to “payment_redirect_url” for payment page before “valid_till”.

If there will be validation errors in request, response will be like:

{
    "status": "fail",
    "message": "Some parameters are missing or invalid request data.",
    "errors": {
        "country": [
            "The country field is required."
        ],
        "state": [
            "The state field is required."
        ]
    },
    "sulte_apt_no": null,
    "api_key": "api_key"
}

After you redirect to url payment_redirect_url, bellow form will be loaded over iPaytotal payment page. You will need to fill credit card details

3 Response from iPaytotal

After Credit card form fill up, user need to press Pay button. This request will take some time, if user card has 3D secure feature enabled, it will also redirect to 3D secure page, where user will asked to input PIN or OTP if asked. After all process complete, user will be redirect to merchant website according to transaction status.

If transaction will be success, user will redirect to ”response_url” with response in query string as bellow:

https://ipaytotal.solutions/success?status=success&message=Your%20transaction%20was%20success&order_id=20190000458521&sulte_apt_no=456789521365

If the transaction will fail, user will redirect to also “response_url” with response in query string as bellow:

https://ipaytotal.solutions/fail?status=fail&message=Activity%20limit%20exceeded.&order_id=20190000458521&sulte_apt_no=456789521365

For more details see iPaytotal Hosted API.docx file in the root of the project.

About

iPaytotal Hosted API


Languages

Language:Hack 74.3%Language:PHP 25.7%