Example #1
0
 /**
  * @inheritDoc
  */
 public function getCustomFields(Gateway $gateway = null)
 {
     // Override merchant urls - append order data to it
     if (!is_null($gateway)) {
         $urls = $gateway->getMerchantUrls(['_merchantRef' => $this->order->getId()]);
         $data = ['gateway.successurl' => $urls['success'], 'gateway.errorurl' => $urls['error']];
     }
     if ($this->payment instanceof InternetBank) {
         $data['bank_type'] = $this->payment->getBank();
     }
     return $data;
 }
Example #2
0
 /**
  * @inheritDoc
  * @return \Swedbank\SPP\Response\QueryResponse
  */
 public function parseResponse($response)
 {
     $responseClass = '\\Swedbank\\SPP\\Response\\QueryResponse' . $this->method->getCodeName();
     return new $responseClass($this->type, $response);
 }