Fixes for redirect URL when client portal is disabled

This commit is contained in:
David Bomba 2024-09-05 16:08:09 +10:00
parent 45553416de
commit 59ba737f5d

View File

@ -226,7 +226,7 @@ class CreditCard implements LivewireMethodInterface
$payment = $this->payfast->createPayment($payment_record, Payment::STATUS_COMPLETED); $payment = $this->payfast->createPayment($payment_record, Payment::STATUS_COMPLETED);
//return redirect()->route('client.payments.show', ['payment' => $this->payfast->encodePrimaryKey($payment->id)]); return redirect()->route('client.payments.show', ['payment' => $payment->hashed_id]);
} }
private function processUnsuccessfulPayment($server_response) private function processUnsuccessfulPayment($server_response)
@ -265,8 +265,8 @@ class CreditCard implements LivewireMethodInterface
$payfast_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.payments.index'), 'return_url' => route('client.invoice.show',['invoice' => $this->payfast->payment_hash->fee_invoice->hashed_id]), //route('client.payments.index'),
'cancel_url' => route('client.payment_methods.index'), 'cancel_url' => route('client.invoice.show',['invoice' => $this->payfast->payment_hash->fee_invoice->hashed_id]), //route('client.payment_methods.index'),
'notify_url' => $this->payfast->genericWebhookUrl(), 'notify_url' => $this->payfast->genericWebhookUrl(),
'm_payment_id' => $data['payment_hash'], 'm_payment_id' => $data['payment_hash'],
'amount' => $data['amount_with_fee'], 'amount' => $data['amount_with_fee'],