コード例 #1
0
		{
			$mailsubject= "ICEPAY IPN Fatal Error on your Site";
			$mailbody= "Hello,
			A fatal error occured while processing a ICEPAY transaction(IP not in range).
			----------------------------------
			IP: ".$_SERVER['REMOTE_ADDR'];
			$emailObj= new stdClass();
			$emailObj->subject= $mailsubject;
			$emailObj->body= $mailbody;
			$apiEmail->sendToAdminGroup($emailObj, $oseMscConfig->admin_group);
			exit;
		}
	}
	
	$tran = new ICEPAY($merchant_id,$secret_code);
	if($tran->OnPostback())
	{
		$data = $tran->GetPostback();
		$status = $data->status;
		$reference = $data->reference;
		$db = JFactory::getDBO();
		$where= array();
		$where[]= "`order_number`=".$db->quote($reference);
		$payment= oseRegistry :: call('payment');
		$orderInfo = $payment->getOrder($where, 'obj');
		$order_id= $orderInfo->order_id;
		$member_id= $orderInfo->user_id;
		$orderInfoParams= oseJson :: decode($orderInfo->params);
		
		if(empty($orderInfo)) {
			$mailsubject= "ICEPAY IPN Fatal Error on your Site";