curl --location 'http://uat-payments.alps.cl/justpay/check-out/SecurePayment.php' \
--form 'public_key="{YOUR_PUBLIC_KEY}"' \
--form 'time="2024-07-17 16:33:11"' \
--form 'amount="2000"' \
--form 'currency="MXN"' \
--form 'trans_id="1"' \
--form 'time_expired="120"' \
--form 'url_ok="https://bit.ly/3S4I7iR"' \
--form 'url_error="https://bit.ly/3S5aOwc"' \
--form 'channel="37"' \
--form 'signature="{YOUR_SIGNATURE}"' \
--form 'shopper_information="{
\"Phone\": \"9876543210\",
\"email\": \"[email protected]\",
\"country_code\": \"+52\",
\"name_shopper\": \"Juan\",
\"Num_doc_identi\": \"MAAR790213HMNRLF03\",
\"type_doc_identi\": \"CURP\",
\"last_name_Shopper\": \"Pérez López\",
\"country\":\"MEX\"
}"'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://uat-payments.alps.cl/justpay/check-out/SecurePayment.php',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('public_key' => '{YOUR_PUBLIC_KEY}','time' => '2024-07-17 16:33:11','amount' => '2000','currency' => 'MXN','trans_id' => '1','time_expired' => '120','url_ok' => 'https://bit.ly/3S4I7iR','url_error' => 'https://bit.ly/3S5aOwc','channel' => '37','signature' => '{YOUR_SIGNATURE}','shopper_information' => '{
"Phone": "9876543210",
"email": "[email protected]",
"country_code": "+52",
"name_shopper": "Juan",
"Num_doc_identi": "MAAR790213HMNRLF03",
"type_doc_identi": "CURP",
"last_name_Shopper": "Pérez López",
"country":"MEX"
}'),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "http://uat-payments.alps.cl/justpay/check-out/SecurePayment.php"
payload = {'public_key': '{YOUR_PUBLIC_KEY}',
'time': '2024-07-17 16:33:11',
'amount': '2000',
'currency': 'MXN',
'trans_id': '1',
'time_expired': '120',
'url_ok': 'https://bit.ly/3S4I7iR',
'url_error': 'https://bit.ly/3S5aOwc',
'channel': '37',
'signature': '{YOUR_SIGNATURE}',
'shopper_information': '{
"Phone": "9876543210",
"email": "[email protected]",
"country_code": "+52",
"name_shopper": "Juan",
"Num_doc_identi": "MAAR790213HMNRLF03",
"type_doc_identi": "CURP",
"last_name_Shopper": "Pérez López",
"country":"MEX"
}'}
files=[
]
headers = {}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
var request = require('request');
var options = {
'method': 'POST',
'url': 'http://uat-payments.alps.cl/justpay/check-out/SecurePayment.php',
'headers': {
},
formData: {
'public_key': '{YOUR_PUBLIC_KEY}',
'time': '2024-07-17 16:33:11',
'amount': '2000',
'currency': 'MXN',
'trans_id': '1',
'time_expired': '120',
'url_ok': 'https://bit.ly/3S4I7iR',
'url_error': 'https://bit.ly/3S5aOwc',
'channel': '37',
'signature': '{YOUR_SIGNATURE}',
'shopper_information': '{\n "Phone": "9876543210",\n "email": "[email protected]",\n "country_code": "+52",\n "name_shopper": "Juan",\n "Num_doc_identi": "MAAR790213HMNRLF03",\n "type_doc_identi": "CURP",\n "last_name_Shopper": "Pérez López",\n "country":"MEX"\n}'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});