payInline() public method

Executes payment via INLINE GoPay payment gate
public payInline ( Markette\Gopay\Entity\Payment $payment, string $channel, callable $callback ) : array
$payment Markette\Gopay\Entity\Payment
$channel string
$callback callable
return array
Example #1
0
 /**
  * Creates and send payment request to GoPay
  *
  * @param int $id
  * @param string $channel
  */
 public function actionPayInline($id, $channel)
 {
     // same as above
     // here we communicate with Gopay Web Service (via soap)
     $response = $this->paymentService->payInline($payment, $channel, $storePaymentId);
     // redirect to Gopay Payment Gate
     $this->sendJson(['url' => $response['url'], 'signature' => $response['signature']]);
 }