|
@@ -96,7 +96,7 @@ class EmailService
|
|
|
$response = $this->callJava('/api/email/send', $params, null);
|
|
|
}
|
|
|
|
|
|
- public function notifyUserOnFailedTransaction(User $user)
|
|
|
+ public function notifyUserOnFailedTransaction(User $user, StoreOrder $storeOrder)
|
|
|
{
|
|
|
if(!@$user->getEmail()) return;
|
|
|
$appInternalName = $this->appInternalName;
|
|
@@ -167,4 +167,28 @@ class EmailService
|
|
|
|
|
|
$response = $this->callJava('/api/email/send', $params, null);
|
|
|
}
|
|
|
+
|
|
|
+ public function sendUserOrderChargeSuccessful(User $user, StoreOrder $storeOrder)
|
|
|
+ {
|
|
|
+ if (!$user->getEmail()) return;
|
|
|
+ $appInternalName = $this->appInternalName;
|
|
|
+ $stringMappingConfig = $this->stringMappingConfig;
|
|
|
+ $appUrl = $this->appUrl;
|
|
|
+ $emailFromName = $this->emailFromName;
|
|
|
+ $html = (string) view('emails.templates.user-payment-successful', compact('storeOrder', 'user', 'appUrl', 'emailFromName', 'appInternalName', 'stringMappingConfig'));
|
|
|
+ $plainText = (string) '';
|
|
|
+
|
|
|
+ $params = [
|
|
|
+ 'fromEmailAddress' => $this->fromEmailAddress,
|
|
|
+ 'fromName' => $this->emailFromName,
|
|
|
+ 'toEmailAddress' => $user->getEmail(),
|
|
|
+ 'subject' => 'Order Charged successfully!',
|
|
|
+ 'contentHtml' => $html,
|
|
|
+ 'contentText' => $plainText,
|
|
|
+ 'entityType' => 'USER',
|
|
|
+ 'entityUid' => $user->uid,
|
|
|
+ ];
|
|
|
+
|
|
|
+ $response = $this->callJava('/api/email/send', $params, null);
|
|
|
+ }
|
|
|
}
|