Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sampel request to verify transactions
$code = '1212ujwq';
header( 'HTTP/1.1 200 OK' );
$opts = array(
'header'=>"Authorization: Bearer sk_test_877a9699bbc3cf8e42f2190f1b39e35e974d5e2d\r\n"
$context = stream_context_create($opts);
$url = ''.$code;
$request = file_get_contents($url, false, $context);
$result = json_decode($request);
if ($result->data->status == "success") {
$paid = $result->data->amount/100;
if ($booking->totalprice == $paid) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment