Changeset View
Changeset View
Standalone View
Standalone View
src/app/Providers/Payment/Mollie.php
Show All 28 Lines | public function customerLink(Wallet $wallet): ?string | ||||
return sprintf( | return sprintf( | ||||
'<a href="https://www.mollie.com/dashboard/customers/%s" target="_blank">%s</a>', | '<a href="https://www.mollie.com/dashboard/customers/%s" target="_blank">%s</a>', | ||||
$customer_id, | $customer_id, | ||||
$customer_id | $customer_id | ||||
); | ); | ||||
} | } | ||||
/** | /** | ||||
* Validates that mollie available. | |||||
* | |||||
* @throws \Mollie\Api\Exceptions\ApiException on failure | |||||
* @return bool true on success | |||||
machniak: we prefer `bool` over `boolean` in phpdoc. | |||||
*/ | |||||
public static function healthcheck() | |||||
{ | |||||
mollie()->methods()->allActive(); | |||||
return true; | |||||
} | |||||
/** | |||||
* Create a new auto-payment mandate for a wallet. | * Create a new auto-payment mandate for a wallet. | ||||
* | * | ||||
* @param \App\Wallet $wallet The wallet | * @param \App\Wallet $wallet The wallet | ||||
* @param array $payment Payment data: | * @param array $payment Payment data: | ||||
* - amount: Value in cents (optional) | * - amount: Value in cents (optional) | ||||
* - currency: The operation currency | * - currency: The operation currency | ||||
* - description: Operation desc. | * - description: Operation desc. | ||||
* - methodId: Payment method | * - methodId: Payment method | ||||
▲ Show 20 Lines • Show All 584 Lines • Show Last 20 Lines |
we prefer bool over boolean in phpdoc.