Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.76 KB | None | 0 0
  1. public function notifyUrl() {
  2.  
  3.   if(isset($_POST['cpm_trans_id'])) {
  4.         // Initialisation de CinetPay et Identification du paiement
  5.         $id_transaction = $_POST['cpm_trans_id'];
  6.         $apiKey = "1078567447584180beb603a5.42354627";
  7.         $site_id = "808931";
  8.         $plateform = "PROD";
  9.         $version = "V1";
  10.         $CinetPay = new CinetPay($site_id, $apiKey, $plateform, $version);
  11.        
  12.         $CinetPay->setTransId($id_transaction)->getPayStatus();
  13.         $cpm_result = $CinetPay->_cpm_result;
  14.  
  15.         // Si le payement a réussi!
  16.         if($cpm_result == '00') {
  17.             $r = $this->sendSMS($this->session->userdata('user_telephone'));
  18.             //$r = $this->saveInDatabase();
  19.             exit(0);
  20.         }
  21.        
  22.   }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement