Exemplo n.º 1
0
 function paymentcallback($data = null)
 {
     $store = new StoreModel();
     $data['transactionid'] = filter_input(INPUT_POST, 'transactionid');
     $data['gameruserid'] = filter_input(INPUT_POST, 'gameuserid');
     $data['currency'] = filter_input(INPUT_POST, 'currency');
     $data['amount'] = filter_input(INPUT_POST, 'amount');
     $data['paymentResult'] = filter_input(INPUT_POST, 'paymentresult');
     $data['paymenttransactionid'] = filter_input(INPUT_POST, 'paymenttransactionid');
     $data['paymenterrormessage'] = filter_input(INPUT_POST, 'paymenterrormessage');
     $data['session'] = filter_input(INPUT_POST, 'session');
     $data['version'] = filter_input(INPUT_POST, 'version');
     $data['auth'] = filter_input(INPUT_POST, 'auth');
     //check to see if transaction id exitsts
     list($hasOrder, $response) = $store->getYahooPendingOrder($data);
     Log::add('Has Order: ' . $hasOrder . ' and response: ' . print_r($response, true));
     if ($hasOrder) {
         //lets do some comparing amount/name
         $message = "success";
     } else {
         $message = "error";
     }
     //check to see if A) we have a trans action ID
     //if so! then we match the amount
     //and then we f**k just kill shit.
     echo "success";
     Log::add('Yahoo Payment Callback Called?!');
 }