mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Test sending welcome voucher email through server
This commit is contained in:
@@ -46,10 +46,10 @@ class SendWelcomeVoucherEmail implements ShouldQueue
|
||||
{
|
||||
$currentDatetime = Carbon::now();
|
||||
$dateToCompare = Carbon::parse($this->voucher->end_date);
|
||||
// if (!$this->user->hasAttribute($this->voucher->code."_EMAIL_COUNT")
|
||||
// && $this->user->rewards->where('voucher_id', $this->voucher->id)->count() > 0
|
||||
// && $currentDatetime->isBefore($dateToCompare))
|
||||
// {
|
||||
if (!$this->user->hasAttribute($this->voucher->code."_EMAIL_COUNT")
|
||||
&& $this->user->rewards->where('voucher_id', $this->voucher->id)->count() > 0
|
||||
&& $currentDatetime->isBefore($dateToCompare))
|
||||
{
|
||||
//Key #1
|
||||
$keyValuePairObject = new KeyValuePairObject(
|
||||
$this->voucher->code."_EMAIL_COUNT",
|
||||
@@ -65,6 +65,6 @@ class SendWelcomeVoucherEmail implements ShouldQueue
|
||||
(App()->make(CreatesKeyValuePair::class))->execute($this->user, $keyValuePairObject);
|
||||
|
||||
$this->user->notify(new WelcomeVoucherEmail($this->user, $this->voucher));
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user