mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Support setting redirect URL for buy now button
This commit is contained in:
parent
c8d4941fa6
commit
531b707945
@ -162,7 +162,8 @@ class OnlinePaymentController extends BaseController
|
||||
private function completePurchase($invitation, $isOffsite = false)
|
||||
{
|
||||
if ($redirectUrl = session('redirect_url:' . $invitation->invitation_key)) {
|
||||
return redirect()->to($redirectUrl . '?invoice_id=' . $invitation->invoice->public_id);
|
||||
$separator = strpos($redirectUrl, '?') === false ? '?' : '&';
|
||||
return redirect()->to($redirectUrl . $separator . 'invoice_id=' . $invitation->invoice->public_id);
|
||||
} else {
|
||||
// Allow redirecting to iFrame for offsite payments
|
||||
return redirect()->to($invitation->getLink('view', ! $isOffsite));
|
||||
|
@ -2256,7 +2256,7 @@ $LANG = array(
|
||||
'force_pdfjs_help' => 'Replace the built-in PDF viewer in :chrome_link and :firefox_link.<br/>Enable this if your browser is automatically downloading the PDF.',
|
||||
'force_pdfjs' => 'PDF Viewer',
|
||||
'redirect_url' => 'Redirect URL',
|
||||
'redirect_url_help' => 'Optionally specify a URL to redirect to after a payment is made.',
|
||||
'redirect_url_help' => 'Optionally specify a URL to redirect to after a payment is made entered.',
|
||||
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user