Changeset View
Changeset View
Standalone View
Standalone View
src/app/Providers/PaymentProvider.php
Show First 20 Lines • Show All 297 Lines • ▼ Show 20 Lines | public static function paymentMethods(Wallet $wallet, $type): array | ||||
$methods = $provider->providerPaymentMethods($type, $wallet->currency); | $methods = $provider->providerPaymentMethods($type, $wallet->currency); | ||||
if (!empty(\config('services.coinbase.key'))) { | if (!empty(\config('services.coinbase.key'))) { | ||||
$coinbaseProvider = PaymentProvider::factory(self::PROVIDER_COINBASE); | $coinbaseProvider = PaymentProvider::factory(self::PROVIDER_COINBASE); | ||||
$methods = array_merge($methods, $coinbaseProvider->providerPaymentMethods($type, $wallet->currency)); | $methods = array_merge($methods, $coinbaseProvider->providerPaymentMethods($type, $wallet->currency)); | ||||
} | } | ||||
$methods = self::applyMethodWhitelist($type, $methods); | $methods = self::applyMethodWhitelist($type, $methods); | ||||
\Log::debug("Loaded payment methods" . var_export($methods, true)); | \Log::debug("Loaded payment methods " . var_export($methods, true)); | ||||
Cache::put($cacheKey, $methods, now()->addHours(1)); | Cache::put($cacheKey, $methods, now()->addHours(1)); | ||||
return $methods; | return $methods; | ||||
} | } | ||||
/** | /** | ||||
* Returns the full URL for the wallet page, used when returning from an external payment page. | * Returns the full URL for the wallet page, used when returning from an external payment page. | ||||
Show All 16 Lines |