wp-pay-gateways /
ogone
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Pronamic\WordPress\Pay\Gateways\Ingenico\OrderStandardEasy; |
||
| 4 | |||
| 5 | use Pronamic\WordPress\Pay\Gateways\Ingenico\Data; |
||
| 6 | use Pronamic\WordPress\Pay\Gateways\Ingenico\Parameters; |
||
| 7 | |||
| 8 | /** |
||
| 9 | * Title: Ingenico OrderStandard easy client |
||
| 10 | * Description: |
||
| 11 | * Copyright: 2005-2019 Pronamic |
||
| 12 | * Company: Pronamic |
||
| 13 | * |
||
| 14 | * @author Remco Tolsma |
||
| 15 | * @version 2.0.0 |
||
| 16 | * @since 1.0.0 |
||
| 17 | */ |
||
| 18 | class Client { |
||
| 19 | /** |
||
| 20 | * An payment type indicator for iDEAL |
||
| 21 | * |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | const PAYMENT_TYPE_IDEAL = 'iDEAL'; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * The URL for testing |
||
| 28 | * |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | private $payment_server_url; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Home URL |
||
| 35 | * |
||
| 36 | * @var string |
||
| 37 | */ |
||
| 38 | private $data; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Constructs and initialize a iDEAL easy object |
||
| 42 | * |
||
| 43 | * @param string $psp_id |
||
| 44 | */ |
||
| 45 | public function __construct( $psp_id ) { |
||
| 46 | $this->data = new Data(); |
||
|
0 ignored issues
–
show
|
|||
| 47 | $this->data->set_field( Parameters::PSPID, $psp_id ); |
||
| 48 | $this->data->set_field( 'PM', self::PAYMENT_TYPE_IDEAL ); |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Get the payment server URL |
||
| 53 | * |
||
| 54 | * @return string the payment server URL |
||
| 55 | */ |
||
| 56 | public function get_payment_server_url() { |
||
| 57 | return $this->payment_server_url; |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Set the payment server URL |
||
| 62 | * |
||
| 63 | * @param string $url an URL |
||
| 64 | */ |
||
| 65 | public function set_payment_server_url( $url ) { |
||
| 66 | $this->payment_server_url = $url; |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * Get data |
||
| 71 | * |
||
| 72 | * @return Data |
||
| 73 | */ |
||
| 74 | public function get_data() { |
||
| 75 | return $this->data; |
||
|
0 ignored issues
–
show
|
|||
| 76 | } |
||
| 77 | |||
| 78 | /** |
||
| 79 | * Get fields |
||
| 80 | * |
||
| 81 | * @since 1.2.1 |
||
| 82 | * @return array |
||
| 83 | */ |
||
| 84 | public function get_fields() { |
||
| 85 | return $this->data->get_fields(); |
||
| 86 | } |
||
| 87 | } |
||
| 88 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..