$connector
$connector :
Class PaymentMethod
__construct(\Ezypay\Contract\IDriver $connector, $validation)
PaymentMethod constructor.
| \Ezypay\Contract\IDriver | $connector | |
| $validation | ValidationBase |
findAll(array $data = array()) : \Ezypay\Result\ResultProducer
Retrieves the list of available payment method details of an existing customer.
| array | $data |
findById( $id) : \Ezypay\Result\ResultProducer
Retrieves a particular payment method details of an existing customer.
| $id | string The ID of the payment method. |
findDefault(array $data) : \Ezypay\Result\ResultProducer
Retrieves the default payment method details of an existing customer.
| array | $data |
create(array $data) : \Ezypay\Result\ResultProducer
Creates a new bank payment method for an existing customer. If the payment method's owner has no default payment method specified, then the new bank account will become the default. However, if the owner already has a default then it will not change unless setAsDefault flag is set to true.
| array | $data | The bank account data. Refer to request body schema (see link). |
setDefault( $paymentMethodId, $customerId) : \Ezypay\Result\ResultProducer
You can switch default payment method for an existing customer.
| $paymentMethodId | string The ID of the payment method. |
|
| $customerId | string The ID of the customer. A unique identifier generated by the system. |
remove( $paymentMethodId, $customerId) : \Ezypay\Result\ResultProducer
You can remove an obsolete Payment Method which belongs to a customer.
| $paymentMethodId | string The ID of the payment method. |
|
| $customerId | string The ID of the customer. A unique identifier generated by the system. |
addValidator(\Ezypay\Contract\IValidator $validator)
| \Ezypay\Contract\IValidator | $validator |
result() : \Ezypay\Result\ResultProducer
Result