To familiarize with methods of API work we recommend to read VISA guide.
- App registration and getting RSA Private key
- Login and password
- Certificate
- Template process
- Test data for Visa
App registration and getting RSA Private key
Create new application and don't forget to mark API's you need to get access to. Otherwise you'll have to register new application.
After app creation you will see the window with RSA PRIVATE KEY:
It' s necessary to copy the received private key and save it in file.You will need it for getting VISA API.
Key content starts and ends the following way
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
Login and password
##Certificate
Certificate is required to download and rename in .txt extension file. You will need file content in order to set API running.
It is required to copy the whole file content
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
Template process
Click Use this process and template "VISA_P2P" will copy to your environment.
The common P2P scheme looks in following way:
This scheme is realized by core-process "Core"
Preparing
1) Add your keys and all other required parameters in "Config" node of "MAIN" process - replace variables in double braces ({{visa_user}}, {{visa_password}} etc.) by constant values.
Exactly this process is the beginning of P2P realization.
2) Add RSA Private key and CERTIFICATE Visa to all Visa process nodes where Visa API run is.
For this, highlight node, press Additionally
Paste RSA Private key in Sign the request by certificate
field and CERTIFICATE Visa in empty lines between
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
and
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
respectively.
All processes, where Visa API running is, are located in "VISA" folder.
Test data for Visa
{
"address" : {
"county": "San Mateo",
"state": "CA",
"zipCode": "94404",
"country": "USA",
"city" : "Dnepr"
},
"card":"4895142232120006",
"card_cvv":"111",
"card_date":"2017-11",
"receiver_card":"4895142232120006",
"amount":1,
"currency":"USD",
"fee":0,
"sender_name":"Dima",
"receiver_name":"Dima 2",
"order_id":123
}
For refund test you need to specify:
receiver_card = 4895142232120005
For Visa P2P scheme on pretreatment step ("Prepare" - First process node "Core" there's "gag" - the parameters planned to get are setting up with CODE Logic.