Verifying current page to run a function
Posted: Sun May 02, 2010 6:56 am
Hi,
I'm new here and i really need your help. I'm doing a script to one online store, and it is an offline payment processor that generate a code to pay with credit card (Offline). When it generate the code, the script send an sms text message to customer with generated data... My problem is that it always send the sms in checkout and orders page....
I'm trying this:
Is there something wrong? with this code it stops sending any sms, if i remove that it sends always, on checkout and in orders page.
If someone can help me, i appreciate.
Thanks
Mozack
I'm new here and i really need your help. I'm doing a script to one online store, and it is an offline payment processor that generate a code to pay with credit card (Offline). When it generate the code, the script send an sms text message to customer with generated data... My problem is that it always send the sms in checkout and orders page....
I'm trying this:
Code: Select all
$message = $sms;
$finishorder = GetConfig('ShopPathSSL')."/finishorder.php?provider=".$this->GetId();
$currentpage = GetConfig('ShopPathSSL').$_SERVER["REQUEST_URI"];
$accountpage = GetConfig('ShopPathSSL')."/account.php?acion=order_status";
if ($finishorder == $currentpage){
return $message;
}
elseif ($finishorder == $accountpage) {
return false;
}Is there something wrong? with this code it stops sending any sms, if i remove that it sends always, on checkout and in orders page.
If someone can help me, i appreciate.
Thanks
Mozack