Changeset View
Changeset View
Standalone View
Standalone View
src/app/Providers/Payment/Mollie.php
Show First 20 Lines • Show All 578 Lines • ▼ Show 20 Lines | public function providerPaymentMethods($type): array | ||||
'value' => '1.00', | 'value' => '1.00', | ||||
'currency' => 'CHF' | 'currency' => 'CHF' | ||||
] | ] | ||||
] | ] | ||||
) | ) | ||||
); | ); | ||||
$availableMethods = []; | $availableMethods = []; | ||||
foreach ($providerMethods as $method) { | foreach ($providerMethods as $method) { | ||||
$availableMethods[$method->id] = [ | $availableMethods[$method->id] = [ | ||||
'id' => $method->id, | 'id' => $method->id, | ||||
'name' => $method->description, | 'name' => $method->description, | ||||
'minimumAmount' => round(floatval($method->minimumAmount->value) * 100), // Converted to cents | 'minimumAmount' => round(floatval($method->minimumAmount->value) * 100), // Converted to cents | ||||
'currency' => $method->minimumAmount->currency, | 'currency' => $method->minimumAmount->currency, | ||||
'exchangeRate' => $this->exchangeRate('CHF', $method->minimumAmount->currency) | 'exchangeRate' => \App\Utils::exchangeRate('CHF', $method->minimumAmount->currency) | ||||
]; | ]; | ||||
} | } | ||||
return $availableMethods; | return $availableMethods; | ||||
} | } | ||||
/** | /** | ||||
* Get a payment. | * Get a payment. | ||||
Show All 21 Lines |