-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcallback.php
More file actions
27 lines (24 loc) · 843 Bytes
/
callback.php
File metadata and controls
27 lines (24 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/**
* Callbackurl is used to direct iPay to a web service that you have setup
* which can receive the order transaction status.
* Data sent to the server using POST and contain the following parameters:
* @property string $status
* @property string|null $pan
* @property string $order_id
* @property string $payment_hash
* @property int $ipay_payment_id
* @property string|null $shop_order_id
* @property string $payment_method
* @property string $card_type
* @property string|null $transaction_id
*/
if (isset($_POST['order_id'])) {
if ($order_id == $_POST['order_id'] && $payment_hash == $_POST['payment_hash']) {
//your code
//When you receive a callback, you must return the corresponding HTTP code
header("HTTP/1.1 200 Ok");
} else {
header("HTTP/1.0 404 Not Found");
}
}