| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 77 | 12 | public function get_api_url( $method ) { |
|
| 78 | 12 | if ( Core_Gateway::MODE_TEST === $this->mode ) { |
|
| 79 | 11 | return sprintf( Endpoint::API_URL_TEST, $method ); |
|
| 80 | } |
||
| 81 | |||
| 82 | 2 | if ( empty( $this->api_live_url_prefix ) ) { |
|
| 83 | 1 | throw new \Exception( 'Adyen API Live URL prefix is required for live configurations.' ); |
|
| 84 | } |
||
| 85 | |||
| 86 | 1 | return sprintf( Endpoint::API_URL_LIVE, $this->api_live_url_prefix, $method ); |
|
| 87 | } |
||
| 89 |