Payment response

This commit is contained in:
David Bomba 2021-07-05 20:55:01 +10:00
parent d24047374b
commit 712ff6b881

View File

@ -164,7 +164,7 @@ class CreditCard
public function paymentView($data) public function paymentView($data)
{ {
$data = [ $payfast_data = [
'merchant_id' => $this->payfast->company_gateway->getConfigField('merchantId'), 'merchant_id' => $this->payfast->company_gateway->getConfigField('merchantId'),
'merchant_key' => $this->payfast->company_gateway->getConfigField('merchantKey'), 'merchant_key' => $this->payfast->company_gateway->getConfigField('merchantKey'),
'return_url' => route('client.payment_methods.index'), 'return_url' => route('client.payment_methods.index'),
@ -177,17 +177,17 @@ class CreditCard
'passphrase' => $this->payfast->company_gateway->getConfigField('passphrase'), 'passphrase' => $this->payfast->company_gateway->getConfigField('passphrase'),
]; ];
$data['signature'] = $this->payfast->generateSignature($data); $payfast_data['signature'] = $this->payfast->generateSignature($payfast_data);
$data['gateway'] = $this->payfast; $payfast_data['gateway'] = $this->payfast;
$data['payment_endpoint_url'] = $this->payfast->endpointUrl(); $payfast_data['payment_endpoint_url'] = $this->payfast->endpointUrl();
return render('gateways.payfast.pay', $data); return render('gateways.payfast.pay', array_merge($data, $payfast_data));
} }
public function processPaymentResponse(Request $request) public function processPaymentResponse(Request $request)
{ {
dd($request->all());
} }
} }