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