Skip to content

Commit 99307ef

Browse files
committed
Merge branch 'fix/payments-logs' into stage
2 parents 1e6cf10 + e8fd7ec commit 99307ef

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/billing/cloudpayments.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,13 @@ userId: ${userId}`
150150

151151
if (isCardLinkOperation) {
152152
nextPaymentDate = new Date(lastChargeDate);
153-
nextPaymentDate.setMonth(lastChargeDate.getMonth() + 1);
154153
} else {
155154
nextPaymentDate = new Date(now);
155+
}
156+
157+
if (workspace.isDebug) {
158+
nextPaymentDate.setDate(nextPaymentDate.getDate() + 1);
159+
} else {
156160
nextPaymentDate.setMonth(nextPaymentDate.getMonth() + 1);
157161
}
158162

@@ -544,8 +548,7 @@ sum: ${data.cloudPayments?.recurrent.amount}${body.Currency}`
544548

545549
this.handleSendingToTelegramError(telegram.sendMessage(`✅ [Billing / Pay] New payment
546550
Transaction details:
547-
amount: ${+body.Amount}
548-
currency: ${body.Currency}
551+
amount: ${+body.Amount} ${body.Currency}
549552
next payment date: ${data.cloudPayments?.recurrent.startDate}
550553
workspace id: ${workspace._id}
551554
date of operation: ${body.DateTime}
@@ -664,8 +667,7 @@ subscription id: ${body.SubscriptionId}`
664667

665668
this.handleSendingToTelegramError(telegram.sendMessage(`✅ [Billing / Recurrent] New recurrent transaction
666669
Transaction details:
667-
amount: ${+body.Amount}
668-
currency: ${body.Currency}
670+
amount: ${+body.Amount} ${body.Currency}
669671
next payment date: ${body.NextTransactionDate}
670672
workspace id: ${body.AccountId}
671673
subscription id: ${body.Id}`

0 commit comments

Comments
 (0)