payment_method = $payment_method_id; return $this; } /** * View for displaying custom content of the driver. * * @param array $data * @return mixed */ public function processPaymentView($data) { $invitation = Invoice::findOrFail( $this->decodePrimaryKey($data['invoices']['0']['invoice_id']) )->invitations->first(); $variables = (new HtmlEngine($invitation))->generateLabelsAndValues(); $data['title'] = $this->company_gateway->getConfigField('name'); $data['instructions'] = strtr($this->company_gateway->getConfigField('text'), $variables['values']); $this->payment_hash->data = array_merge((array) $this->payment_hash->data, $data); $this->payment_hash->save(); $data['gateway'] = $this; return render('gateways.custom.payment', $data); } /** * Processing method for payment. Should never be reached with this driver. * * @return mixed */ public function processPaymentResponse($request) { return redirect()->route('client.invoices'); } /** * Detach payment method from custom payment driver. * * @param ClientGatewayToken $token * @return void */ public function detach(ClientGatewayToken $token) { // Driver doesn't support this feature. } }