Hello KK,
I was able to successfully integrate a payment platform into my Couch powered website and got back a response. Now I need to use the response for some further processing but I keep getting an error from couch tag:
This is how I am doing it in Couch:
But I keep getting this error:
What could I be doing wrong? Thank you
I was able to successfully integrate a payment platform into my Couch powered website and got back a response. Now I need to use the response for some further processing but I keep getting an error from couch tag:
This is how I am doing it in Couch:
- Code: Select all
<cms:php>
$ref = "<cms:show tx_ref />";
$trans_id = "<cms:show returned_transaction_id />";
$query = array(
"SECKEY" => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"tx_ref" => $ref
);
$data_string = json_encode($query);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.flutterwave.com/v3/transactions/" . $trans_id . "/verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_POSTFIELDS => $data_string,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
),
));
$response = curl_exec($curl);
curl_close($curl);
var_dump($response);
</cms:php>
But I keep getting this error:
- Code: Select all
C:\Program Files (x86)\Ampps\www\dotmatrix\couch-admin\tags.php(3231) : eval()'d code:32:boolean false
What could I be doing wrong? Thank you