Update
This commit is contained in:
@@ -235,7 +235,7 @@ func (s *memberSvc) sendWelcomeEmail(
|
||||
welcomeData := map[string]interface{}{
|
||||
"UserName": customer.Name,
|
||||
"MemberID": customer.CustomerID,
|
||||
"PointsName": "PoinLo",
|
||||
"PointsName": "ELP",
|
||||
"PointsBalance": customer.Points,
|
||||
"RedeemLink": "https://enaklo.co.id/redeem",
|
||||
"CurrentDate": time.Now().Format("01-20006"),
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s *orderSvc) processPostOrderActions(
|
||||
}
|
||||
|
||||
if order.CustomerID != nil && *order.CustomerID > 0 {
|
||||
err = s.addCustomerPoints(ctx, *order.CustomerID, int(order.Total))
|
||||
err = s.addCustomerPoints(ctx, *order.CustomerID, int(order.Total/1000))
|
||||
if err != nil {
|
||||
logger.ContextLogger(ctx).Error("error when adding points", zap.Error(err))
|
||||
}
|
||||
@@ -136,8 +136,9 @@ func (s *orderSvc) sendTransactionReceipt(ctx mycontext.Context, order *entity.O
|
||||
|
||||
emailData := map[string]interface{}{
|
||||
"UserName": customer.Name,
|
||||
"PointsName": "PoinLo",
|
||||
"PointsBalance": "20",
|
||||
"PointsName": "ELP",
|
||||
"PointsBalance": int(order.Total / 1000),
|
||||
"NewPoints": int(order.Total / 1000),
|
||||
"RedeemLink": "enaklo.co.id",
|
||||
"BranchName": branchName,
|
||||
"TransactionNumber": order.ID,
|
||||
@@ -146,12 +147,13 @@ func (s *orderSvc) sendTransactionReceipt(ctx mycontext.Context, order *entity.O
|
||||
"Items": itemsData,
|
||||
"TotalPayment": fmt.Sprintf("Rp %s", formatCurrency(order.Total)),
|
||||
"ViewTransactionLink": viewTransactionLink,
|
||||
"ExpiryDate": order.CreatedAt.Format("02 January 2006"),
|
||||
}
|
||||
|
||||
return s.notification.SendEmailTransactional(ctx, entity.SendEmailNotificationParam{
|
||||
Sender: "noreply@enaklo.co.id",
|
||||
Recipient: customer.Email,
|
||||
Subject: "Enaklo - Membership Statement",
|
||||
Subject: "Hore, kamu dapat poin!",
|
||||
TemplateName: "monthly_points",
|
||||
TemplatePath: "templates/monthly_points.html",
|
||||
Data: emailData,
|
||||
|
||||
Reference in New Issue
Block a user