Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
38 | public function setOptions($credentials) |
||
39 | { |
||
40 | // Setting API Endpoints |
||
41 | if ($this->mode === 'sandbox') { |
||
42 | $this->config['api_url'] = 'https://api.sandbox.paypal.com'; |
||
43 | |||
44 | $this->config['gateway_url'] = 'https://www.sandbox.paypal.com'; |
||
45 | $this->config['ipn_url'] = 'https://ipnpb.sandbox.paypal.com/cgi-bin/webscr'; |
||
46 | } else { |
||
47 | $this->config['api_url'] = 'https://api.paypal.com/'; |
||
48 | |||
49 | $this->config['gateway_url'] = 'https://www.paypal.com'; |
||
50 | $this->config['ipn_url'] = 'https://ipnpb.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 | } |
||
58 | } |
||
59 |