| @@ 27-33 (lines=7) @@ | ||
| 24 | */ |
|
| 25 | public function setAdaptivePaymentsOptions() |
|
| 26 | { |
|
| 27 | if ($this->mode == 'sandbox') { |
|
| 28 | $this->config['api_url'] = 'https://svcs.sandbox.paypal.com/AdaptivePayments'; |
|
| 29 | $this->config['gateway_url'] = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; |
|
| 30 | } else { |
|
| 31 | $this->config['api_url'] = 'https://svcs.paypal.com/AdaptivePayments'; |
|
| 32 | $this->config['gateway_url'] = 'https://www.paypal.com/cgi-bin/webscr'; |
|
| 33 | } |
|
| 34 | $this->config['notify_url'] = config('paypal.notify_url'); |
|
| 35 | } |
|
| 36 | ||
| @@ 48-54 (lines=7) @@ | ||
| 45 | ||
| 46 | $this->config['gateway_url'] = 'https://www.sandbox.paypal.com'; |
|
| 47 | $this->config['ipn_url'] = 'https://ipnpb.sandbox.paypal.com/cgi-bin/webscr'; |
|
| 48 | } else { |
|
| 49 | $this->config['api_url'] = !empty($this->config['secret']) ? |
|
| 50 | 'https://api-3t.paypal.com/nvp' : 'https://api.paypal.com/nvp'; |
|
| 51 | ||
| 52 | $this->config['gateway_url'] = 'https://www.paypal.com'; |
|
| 53 | $this->config['ipn_url'] = 'https://ipnpb.paypal.com/cgi-bin/webscr'; |
|
| 54 | } |
|
| 55 | ||
| 56 | // Adding params outside sandbox / live array |
|
| 57 | $this->config['payment_action'] = $credentials['payment_action']; |
|