Hey there,
I use Couch Cart on my website and I have integrated a custom payment gateway. Everything is fine, but I need to send information on a page to let the payment provider know that the payment was successful.
The problem is that when I put the php codes on the page into the <cms: php> tags, it gives an error. I share the page below. How can I use php codes on this page. Whatever I tried I was not successful
I use Couch Cart on my website and I have integrated a custom payment gateway. Everything is fine, but I need to send information on a page to let the payment provider know that the payment was successful.
The problem is that when I put the php codes on the page into the <cms: php> tags, it gives an error. I share the page below. How can I use php codes on this page. Whatever I tried I was not successful
- Code: Select all
<?php require_once ('couch/cms.php'); ?>
<cms:php>
$post = $_POST;
$merchant_key = 'biX6xqTn2312MNC1BBwt';
$merchant_salt = 'hJTPi5pe2fd90231889WDZ1xRa';
$hash = base64_encode( hash_hmac('sha256', $post['merchant_oid'].$merchant_salt.$post['status'].$post['total_amount'], $merchant_key, true) );
if( $hash != $post['hash'] )
die('PAYTR notification failed: bad hash');
if( $post['status'] == 'success' ) {
} else {
}
echo "OK";
exit;
</cms:php>
<?php COUCH::invoke(); ?>