Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:laravelcm/laravel.cm into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts committed May 8, 2023
2 parents 78be7bf + 092b988 commit b2e9117
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 8 additions & 5 deletions app/Http/Livewire/Modals/AnonymousSponsors.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ class AnonymousSponsors extends ModalComponent
public ?string $name = null;
public ?string $email = null;
public string $type = 'company';
public string $currency = 'XAF';
public ?string $url = null;

public function mount(string $amount, string $option): void
public function mount(string $amount, string $option, string $currency): void
{
$this->amount = $amount;
$this->option = $option;
$this->currency = $currency;
}

public function submit(): void
Expand All @@ -33,9 +35,9 @@ public function submit(): void
'name' => 'required',
'email' => 'required|email',
], [
'name.required' => 'Votre nom est requis',
'email.required' => 'Une adresse e-mail est requise',
'email.email' => 'Veuillez renseigner une adresse e-mail valide',
'name.required' => __('Votre nom est requis'),
'email.required' => __('Une adresse e-mail est requise'),
'email.email' => __('Veuillez renseigner une adresse e-mail valide'),
]);

$adminUser = User::findByEmailAddress('[email protected]');
Expand All @@ -48,9 +50,10 @@ public function submit(): void
'amount' => $this->amount,
'email' => $this->email,
'name' => $this->name,
'currency' => 'XAF',
'currency' => $this->currency,
'reference' => $adminUser->id . '-' . $adminUser->username() . '-' . uniqid(),
'callback' => route('notchpay-callback'),
'description' => __('Soutien de la communauté Laravel & PHP Cameroun.'),
]);

Transaction::query()->create([
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Livewire/SponsorSubscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public function subscribe(): void
$this->emit('openModal', 'modals.anonymous-sponsors', [
'amount' => $this->amount,
'option' => $this->option,
'currency' => $this->currency,
]);

return;
Expand All @@ -47,6 +48,7 @@ public function subscribe(): void
'currency' => $this->currency,
'reference' => Auth::id() . '-' . Auth::user()?->username() . '-' . uniqid(),
'callback' => route('notchpay-callback'),
'description' => __('Soutien de la communauté Laravel & PHP Cameroun.'),
]);

Transaction::query()->create([
Expand Down

0 comments on commit b2e9117

Please sign in to comment.