コード例 #1
0
ファイル: Service.php プロジェクト: codechap/mygate
 /**
  * Process a payment
  *
  * @var client object
  * @var credit card obejct
  */
 public static function fPayNow($connection)
 {
     // Soap call
     $soap = new \SoapClient($connection->urls['service']);
     // Result
     $request = $soap->fPayNow($connection->get_config('merchant_id'), $connection->get_config('app_id'), $connection->three_d_transaction_id, $connection->card->token, $connection->card->cvc, $connection->payment->amount, $connection->get_config('mode'), $connection->payment->reference, '0', '', '', '', '');
     // Process result and show errors
     $result = \CodeChap\Mygate\Helpers\Terminal::process_results($request);
     // Return it
     return $result['transactionindex'];
 }
コード例 #2
0
ファイル: Threed.php プロジェクト: codechap/mygate
 /**
  * 3D SECURE CALL STEP 1.
  * Check if a user has enrolled for 3D Secure, if so return a form with post to be send to the banks 3d secure page. Step 2 will occur as soon as post data is available.
  */
 public static function tokenlookup($connection)
 {
     // Call, step one.
     $client = new \SoapClient($connection->urls['3d']);
     // Execute
     $request = $client->tokenlookup($connection->get_config('merchant_id'), $connection->get_config('app_id'), $connection->get_config('mode'), $connection->card->token, $connection->payment->amount, \CodeChap\Mygate\Helpers\Client::get_http_user_agent(), \CodeChap\Mygate\Helpers\Client::get_http_accept(), 'merchant reference', 'merchant description', 'N', '', '', '');
     // Find results
     $results = \CodeChap\Mygate\Helpers\Terminal::process_results($request, true);
     // If enrolled, we must verify
     if (isset($results['enrolled']) and $results['enrolled'] == 'Y') {
         return $results;
     }
     // We do not need 3D secure verification
     return false;
 }