Changeset View
Changeset View
Standalone View
Standalone View
src/app/Providers/Payment/Stripe.php
Show First 20 Lines • Show All 322 Lines • ▼ Show 20 Lines | public function webhook(): int | ||||
$setting = WalletSetting::where('key', 'stripe_id') | $setting = WalletSetting::where('key', 'stripe_id') | ||||
->where('value', $intent->customer)->first(); | ->where('value', $intent->customer)->first(); | ||||
if ($setting) { | if ($setting) { | ||||
$setting->wallet->setSetting('stripe_mandate_id', $intent->id); | $setting->wallet->setSetting('stripe_mandate_id', $intent->id); | ||||
} | } | ||||
break; | break; | ||||
default: | |||||
\Log::debug("Unhandled Stripe event: " . var_export($payload, true)); | |||||
break; | |||||
} | } | ||||
return 200; | return 200; | ||||
} | } | ||||
/** | /** | ||||
* Get Stripe customer identifier for specified wallet. | * Get Stripe customer identifier for specified wallet. | ||||
* Create one if does not exist yet. | * Create one if does not exist yet. | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |