Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
24 | public function get_config( $post_id ) { |
||
25 | $mode = get_post_meta( $post_id, '_pronamic_gateway_mode', true ); |
||
26 | |||
27 | $config_class = ( Gateway::MODE_TEST === $mode ) ? $this->config_test_class : $this->config_class; |
||
28 | |||
29 | $config = new $config_class(); |
||
30 | |||
31 | $config->merchant_id = get_post_meta( $post_id, '_pronamic_gateway_ideal_merchant_id', true ); |
||
32 | $config->sub_id = get_post_meta( $post_id, '_pronamic_gateway_ideal_sub_id', true ); |
||
33 | $config->purchase_id = get_post_meta( $post_id, '_pronamic_gateway_ideal_purchase_id', true ); |
||
34 | |||
35 | $config->private_key = get_post_meta( $post_id, '_pronamic_gateway_ideal_private_key', true ); |
||
36 | $config->private_key_password = get_post_meta( $post_id, '_pronamic_gateway_ideal_private_key_password', true ); |
||
37 | $config->private_certificate = get_post_meta( $post_id, '_pronamic_gateway_ideal_private_certificate', true ); |
||
38 | |||
39 | return $config; |
||
40 | } |
||
42 |