Skip to content

Commit bdef45c

Browse files
committed
fixed payment method action issue, set always live mode..
1 parent a6848c3 commit bdef45c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Http/Controllers/Payment.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ public function show(Document $invoice, PaymentRequest $request)
2323

2424
$this->setContactFirstLastName($invoice);
2525

26-
$setting['action'] = ($setting['mode'] == 'live') ? 'https://www.paypal.com/cgi-bin/webscr' : 'https://www.sandbox.paypal.com/cgi-bin/webscr';
26+
$setting['action'] = 'https://www.paypal.com/cgi-bin/webscr';
27+
28+
if (isset($setting['mode']) && $setting['mode'] == 'sandbox') {
29+
$setting['action'] = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
30+
}
2731

2832
$invoice_url = $this->getInvoiceUrl($invoice);
2933

0 commit comments

Comments
 (0)