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