request('POST', $base_url.'/v1.2.0-beta/tokenized/checkout/token/grant', [ 'body' => json_encode([ 'app_key' => $app_key, 'app_secret' => $app_secret ]), 'headers' => [ 'accept' => 'application/json', 'content-type' => 'application/json', 'password' => $password, 'username' => $username, ], ]); $response = json_decode($response->getBody()); $id_token = $response->id_token; ?>
';
} else {
$check_transactionid = pp_check_transaction_exits($trxID);
if($check_transactionid['status'] == false){
if(pp_set_transaction_byid($payment_id, $plugin_slug, $plugin_info['plugin_name'], $payerAccount, $trxID, 'completed')){
echo '';
}
}else{
?>
';
// Decode JSON to use bkashURL
$obj = json_decode($resultdata, true);
?>
location.href="'.$obj['bkashURL'].'";';
}
}
?>