1 | <?php |
||
21 | class DirectDebit |
||
22 | extends \Aimeos\MShop\Service\Provider\Payment\Base |
||
|
|||
23 | implements \Aimeos\MShop\Service\Provider\Payment\Iface |
||
24 | { |
||
25 | private $feConfig = array( |
||
26 | 'directdebit.accountowner' => array( |
||
27 | 'code' => 'directdebit.accountowner', |
||
28 | 'internalcode'=> 'accountowner', |
||
29 | 'label'=> 'Account owner', |
||
30 | 'type'=> 'string', |
||
31 | 'internaltype'=> 'string', |
||
32 | 'default'=> '', |
||
33 | 'required'=> true |
||
34 | ), |
||
35 | 'directdebit.accountno' => array( |
||
36 | 'code' => 'directdebit.accountno', |
||
37 | 'internalcode'=> 'accountno', |
||
38 | 'label'=> 'Account number', |
||
39 | 'type'=> 'string', |
||
40 | 'internaltype'=> 'string', |
||
41 | 'default'=> '', |
||
42 | 'required'=> true |
||
43 | ), |
||
44 | 'directdebit.bankcode' => array( |
||
45 | 'code' => 'directdebit.bankcode', |
||
46 | 'internalcode'=> 'bankcode', |
||
47 | 'label'=> 'Bank code', |
||
48 | 'type'=> 'string', |
||
49 | 'internaltype'=> 'string', |
||
50 | 'default'=> '', |
||
51 | 'required'=> true |
||
52 | ), |
||
53 | 'directdebit.bankname' => array( |
||
54 | 'code' => 'directdebit.bankname', |
||
55 | 'internalcode'=> 'bankname', |
||
56 | 'label'=> 'Bank name', |
||
57 | 'type'=> 'string', |
||
58 | 'internaltype'=> 'string', |
||
59 | 'default'=> '', |
||
60 | 'required'=> true |
||
61 | ), |
||
62 | ); |
||
63 | |||
64 | |||
65 | /** |
||
66 | * Returns the configuration attribute definitions of the provider to generate a list of available fields and |
||
67 | * rules for the value of each field in the frontend. |
||
68 | * |
||
69 | * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket object |
||
70 | * @return array List of attribute definitions implementing \Aimeos\MW\Common\Critera\Attribute\Iface |
||
71 | */ |
||
72 | public function getConfigFE( \Aimeos\MShop\Order\Item\Base\Iface $basket ) |
||
88 | |||
89 | |||
90 | /** |
||
91 | * Checks the frontend configuration attributes for validity. |
||
92 | * |
||
93 | * @param array $attributes Attributes entered by the customer during the checkout process |
||
94 | * @return array An array with the attribute keys as key and an error message as values for all attributes that are |
||
95 | * known by the provider but aren't valid resp. null for attributes whose values are OK |
||
96 | */ |
||
97 | public function checkConfigFE( array $attributes ) |
||
101 | |||
102 | |||
103 | /** |
||
104 | * Sets the payment attributes in the given service. |
||
105 | * |
||
106 | * @param \Aimeos\MShop\Order\Item\Base\Service\Iface $orderServiceItem Order service item that will be added to the basket |
||
107 | * @param array $attributes Attribute key/value pairs entered by the customer during the checkout process |
||
108 | */ |
||
109 | public function setConfigFE( \Aimeos\MShop\Order\Item\Base\Service\Iface $orderServiceItem, array $attributes ) |
||
126 | |||
127 | |||
128 | /** |
||
129 | * Updates the orders for which status updates were received via direct requests (like HTTP). |
||
130 | * |
||
131 | * @param array $params Associative list of request parameters |
||
132 | * @param string|null $body Information sent within the body of the request |
||
133 | * @param string|null &$response Response body for notification requests |
||
134 | * @param array &$header Response headers for notification requests |
||
135 | * @return \Aimeos\MShop\Order\Item\Iface|null Order item if update was successful, null if the given parameters are not valid for this provider |
||
136 | * @throws \Aimeos\MShop\Service\Exception If updating one of the orders failed |
||
137 | */ |
||
138 | public function updateSync( array $params = [], $body = null, &$response = null, array &$header = [] ) |
||
149 | } |