Get payment details
Example request
- PHP
<?php
$shopId = ""; // Payment Point ID
$secretPhrase = ""; // Payment Point Secret
$orderId = ""; // Order ID
$mainUrl = "https://pay.cashbill.pl/ws/rest";
$ch = curl_init();
$sign = sha1($orderId . $secretPhrase);
curl_setopt_array($ch, array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_URL => "{$mainUrl}/payment/{$shopId}/{$orderId}?sign={$sign}",
));
$ret = curl_exec($ch);
$response = json_decode($ret);
if (curl_getinfo($ch, CURLINFO_HTTP_CODE) != "200") {
echo "Error message: {$response->errorMessage}";
} else {
echo "Order Id [{$response->id}] with status [{$response->status}]";
}
Schema of the response
{
"id": "string",
"paymentChannel": "string",
"amount": {
"value": 0,
"currencyCode": "string"
},
"requestedAmount": {
"value": 0,
"currencyCode": "string"
},
"title": "string",
"description": "string",
"personalData": {
"firstName": "string",
"surname": "string",
"email": "string",
"country": "string",
"city": "string",
"postcode": "string",
"street": "string",
"house": "string",
"flat": "string",
"ip": "string"
},
"additionalData": "string",
"status": "string"
}