Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
38 | protected function setOptions(array $credentials): void |
||
39 | { |
||
40 | // Setting API Endpoints |
||
41 | $this->config['api_url'] = 'https://api-m.paypal.com'; |
||
42 | |||
43 | $this->config['gateway_url'] = 'https://www.paypal.com'; |
||
44 | $this->config['ipn_url'] = 'https://ipnpb.paypal.com/cgi-bin/webscr'; |
||
45 | |||
46 | if ($this->mode === 'sandbox') { |
||
47 | $this->config['api_url'] = 'https://api-m.sandbox.paypal.com'; |
||
48 | |||
49 | $this->config['gateway_url'] = 'https://www.sandbox.paypal.com'; |
||
50 | $this->config['ipn_url'] = 'https://ipnpb.sandbox.paypal.com/cgi-bin/webscr'; |
||
51 | } |
||
52 | |||
53 | // Adding params outside sandbox / live array |
||
54 | $this->config['payment_action'] = $credentials['payment_action']; |
||
55 | $this->config['notify_url'] = $credentials['notify_url']; |
||
56 | $this->config['locale'] = $credentials['locale']; |
||
57 | } |
||
59 |