Example #1
0
 /**
  * @param \Gemu\Core\Gateway\EndPoint\Request $request
  *
  * @return array
  */
 protected function resolveClientIP(Request $request)
 {
     $params = $this->cache->loadParams();
     if ($params['config']['flow'] == '3g') {
         $this->cache->pushInfo('Moving to 3g flow');
         $responseCode = 0;
         $operator = $params['config']['operator'];
     } else {
         $this->cache->pushInfo('Moving to wifi flow');
         $responseCode = 3;
         $operator = '';
     }
     return ['correlationId' => $request->getTransactionId(), 'lookupId' => uniqid(), 'operator' => $operator, 'operatorNetworkCode' => 'NTWRK', 'country' => 'ES', 'countryName' => 'Espain', 'responseCode' => $responseCode, 'responseMessage' => ''];
 }
Example #2
0
 /**
  * @param \Gemu\Core\Gateway\EndPoint\Request $request
  *
  * @return array
  */
 protected function capturePayment(Request $request)
 {
     return ['correlationId' => $request->getTransactionId(), 'transactionId' => $request->getTransactionId(), 'responseCode' => 0, 'reasonCode' => 0, 'responseMessage' => '', 'temporaryError' => false, 'billingStatus' => 2];
 }
Example #3
0
 /**
  * @param \Gemu\Core\Gateway\EndPoint\Request $request
  *
  * @return array
  */
 protected function finalizeSession(Request $request)
 {
     $params = $this->cache->loadParams();
     return ['correlationId' => $request->getTransactionId(), 'transactionId' => uniqid(), 'consumerId' => $params['config']['msisdn'], 'operator' => $params['config']['operator'], 'operatorNetworkCode' => 'NTWRK', 'country' => 'ES', 'countryName' => 'ESPAIN', 'responseCode' => 0, 'responseMessage' => ''];
 }