Skip to content

Commit 1255a39

Browse files
committed
Update cloudpayments.ts
1 parent 874b99d commit 1255a39

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/billing/cloudpayments.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ export default class CloudPaymentsWebhooks {
494494
/**
495495
* Cancel payment if it is deferred
496496
*/
497-
if (data.cloudPayments?.recurrent?.startDate) {
497+
if (data.isCardLinkOperation) {
498498
this.handleSendingToTelegramError(telegram.sendMessage(`✅ [Billing / Pay] Recurrent payments activated for «${workspace.name}». 1 RUB charged`, TelegramBotURLs.Money));
499499

500500
await cloudPaymentsApi.cancelPayment(body.TransactionId);
@@ -538,7 +538,7 @@ export default class CloudPaymentsWebhooks {
538538
} catch (e) {
539539
const error = e as Error;
540540

541-
this.sendError(res, PayCodes.SUCCESS, error.toString(), body);
541+
this.sendError(res, PayCodes.SUCCESS, `[Billing / Pay] Error trying to refund for card linking occured: ${error.toString()}`, body);
542542

543543
return;
544544
}

0 commit comments

Comments
 (0)