Example #1
0
 /**
  * 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'];
 }