File tree Expand file tree Collapse file tree 9 files changed +5028
-17894
lines changed Expand file tree Collapse file tree 9 files changed +5028
-17894
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ public static function table(Table $table): Table
80
80
return $ record ->declined_at ->format ('d/m/Y ' );
81
81
}
82
82
83
- return 'depuis le ' . $ record -> submitted_at -> format ( ' d/m/Y ' ) ;
83
+ return '' ;
84
84
})
85
85
->prefixBadges (function ($ record ) {
86
86
if ($ record ->approved_at ) {
@@ -97,8 +97,7 @@ public static function table(Table $table): Table
97
97
];
98
98
}
99
99
100
- return [Badge::make ('En attente ' )
101
- ->color ('warning ' )];
100
+ return '' ;
102
101
})
103
102
->searchable ()
104
103
->sortable (),
Original file line number Diff line number Diff line change 5
5
namespace App \Listeners ;
6
6
7
7
use App \Events \SponsoringPaymentInitialize ;
8
+ use App \Mail \SendSponsorThanksMail ;
8
9
use App \Notifications \NewSponsorPaymentNotification ;
9
10
use Illuminate \Notifications \AnonymousNotifiable ;
11
+ use Illuminate \Support \Facades \Mail ;
10
12
11
13
final readonly class SendPaymentNotification
12
14
{
13
15
public function __construct (private AnonymousNotifiable $ notifiable ) {}
14
16
15
17
public function handle (SponsoringPaymentInitialize $ event ): void
16
18
{
19
+ /**
20
+ * @var array $merchant
21
+ */
22
+ $ merchant = $ event ->transaction ->getMetadata ('merchant ' );
23
+
17
24
$ this ->notifiable ->notify (new NewSponsorPaymentNotification ($ event ->transaction ));
25
+
26
+ Mail::to ($ merchant ['email ' ])
27
+ ->send (new SendSponsorThanksMail ($ merchant ['name ' ]));
18
28
}
19
29
}
Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ public function submit(): void
143
143
'reference ' => $ payload ->transaction ->merchant_reference ,
144
144
'customer ' => $ payload ->transaction ->customer ,
145
145
'name ' => $ name ,
146
+ 'email ' => $ email ,
146
147
'laravel_cm_id ' => Auth::id () ?? null ,
147
148
'profile ' => data_get ($ this ->form ->getState (), 'profile ' ),
148
149
],
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace App \Mail ;
6
+
7
+ use Illuminate \Bus \Queueable ;
8
+ use Illuminate \Mail \Mailable ;
9
+ use Illuminate \Mail \Mailables \Content ;
10
+ use Illuminate \Mail \Mailables \Envelope ;
11
+ use Illuminate \Queue \SerializesModels ;
12
+
13
+ final class SendSponsorThanksMail extends Mailable
14
+ {
15
+ use Queueable, SerializesModels;
16
+
17
+ public function __construct (public string $ name ) {}
18
+
19
+ public function envelope (): Envelope
20
+ {
21
+ return new Envelope (
22
+ subject: __ ('emails/sponsor.subject ' ),
23
+ );
24
+ }
25
+
26
+ public function content (): Content
27
+ {
28
+ return new Content (
29
+ markdown: 'emails.send-sponsor-thanks-mail ' ,
30
+ with: [
31
+ 'name ' => $ this ->name ,
32
+ ],
33
+ );
34
+ }
35
+ }
You can’t perform that action at this time.
0 commit comments