Download the PHP package netopia/paymentsv2 without Composer
On this page you can find all versions of the php package netopia/paymentsv2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download netopia/paymentsv2
More information about netopia/paymentsv2
Files in netopia/paymentsv2
Package paymentsv2
Short Description The Payments API was designed and implemented by NETOPIA Payments development team and is meant to be used in third party applications to cover the payment process.
License Apache-2.0
Informations about the package paymentsv2
Introduction
The NETOPIA Payment PHP library provides easy access to the NETOPIA Payments API from applications written in the PHP language.
Compatible
PHP 5.7.x - 8.0.x
API Documention
API Specification
Installation
To install the library via composer, run the following command:
- composer require netopia/paymentsv2
Or add "netopia/paymentsv2": "^1.0.0" to the "require" section in composer.json
API Actions
Start
Use this endpoint to start a payment. Based on the response to this call the process either stops or you need to continue with verify_auth
- Endpoint: /payment/card/start
- Method:
POST
-
Param type: JSON
- Param structure: The JSON as parameter has tree main part
- Config: to set configiguraton section of a transaction
- Payment: to set payment method and card informations of a transaction
- Order: to set order details for a transction
- Param structure: The JSON as parameter has tree main part
-
Sandbox URL:
https://secure.sandbox.netopia-payments.com/payment/card/start // Start endpoint URL - Sandbox
-
Live URL:
https://secure.mobilpay.ro/pay/payment/card/start // Start endpoint URL - Live
-
Steps for start
-
1) Define setting
-
2) Make start json request
- Sample JSON:
-
3) Send your request
-
Sample Start response:
The response of START endpoint, will be a Json with following structure
-
-
4) Analyzing Error Code
To continue payment progress, you will need to verify the error code in your app
Error codes
-
100 : Requires 3-D Secure authentication
-
56 : duplicated Order ID
-
99 : There is another order with a different price
-
19 : Expire Card Error
-
20 : Founduri Error
-
21 : CVV Error
-
22 : CVV Error
-
34 : Card Tranzactie nepermisa Error
- 0 : Card has no 3DS
Status codes
- 15 : need authorize
- 3 : is paid
- 5 : is confirmed
Note
Error Code 100 & Status 15, means you need to do Authorize the transaction via Bank first (3DS) Error Code 0 & Status 3, means your job is done.
Base on other Error code you can handle the progress of payment .
-
-
5) Authorize 3D card
What to send
Find parameters to send from response of previous action on data -> formData
How to send
For authorize of 3D card, you will need to send a HTTP request via Form by POST method to Bank authentication URL.
WHere to send
you have the Bank authentication URL from response of previous action on data -> customerAction -> url
-
6) Verify authentication
To verify authentication you will need to send the request to verify-auth end point,
- Action URL: /payment/card/verify-auth
- Method:
POST
- Param type: JSON
- Params:
- authenticationToken: The unique authentication token, from start action
- ntpID: The transaction id from start action
- paRes: The DATA from client's bank
- Params:
Example of verify-auth setting
make verify-auth json request
send verify-auth json request
Json ex. of verify-auth response
verify-auth action response
The response of verify-auth endpoint, will be a Json with following structure
Regarding the error code & the status you will be able to manage the messages & the actions on your Site / App after the success or failed payments in 3DS
What is 3DS
3DS is a security protocol used to authenticate users / card holders.
-
What kind of data need to be collected for 3DS
To have benefit of 3DS need to be collected some simple data of the User's device, what they used it to make the payments
Like : OS name, OS version, IP, ...