rebill-web-components-sdk 1.10.11 → 1.10.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/cjs/index-C-VTnc0I.js.map +1 -1
  2. package/dist/cjs/{payment-error-mapper-DMma7xTr.js → payment-error-mapper-BBaiDgUx.js} +4 -2
  3. package/dist/cjs/payment-error-mapper-BBaiDgUx.js.map +1 -0
  4. package/dist/cjs/rebill-checkout.cjs.entry.js +1 -1
  5. package/dist/cjs/rebill-renewal.cjs.entry.js +18 -10
  6. package/dist/cjs/rebill-renewal.entry.cjs.js.map +1 -1
  7. package/dist/collection/components/renewal/rebill-renewal.js +17 -9
  8. package/dist/collection/components/renewal/rebill-renewal.js.map +1 -1
  9. package/dist/collection/models/enums/payment-status.enum.js +1 -0
  10. package/dist/collection/models/enums/payment-status.enum.js.map +1 -1
  11. package/dist/collection/utils/payment-error-mapper.js +1 -0
  12. package/dist/collection/utils/payment-error-mapper.js.map +1 -1
  13. package/dist/components/p-8BpuJ_V5.js.map +1 -1
  14. package/dist/components/{p-tTo6r99B.js → p-Dkw3idq6.js} +4 -2
  15. package/dist/components/p-Dkw3idq6.js.map +1 -0
  16. package/dist/components/rebill-checkout.js +1 -1
  17. package/dist/components/rebill-renewal.js +18 -10
  18. package/dist/components/rebill-renewal.js.map +1 -1
  19. package/dist/esm/index-BTZ7D7jU.js.map +1 -1
  20. package/dist/esm/{payment-error-mapper-CtMCCzwd.js → payment-error-mapper-lsQ45Ggo.js} +4 -2
  21. package/dist/esm/payment-error-mapper-lsQ45Ggo.js.map +1 -0
  22. package/dist/esm/rebill-checkout.entry.js +1 -1
  23. package/dist/esm/rebill-renewal.entry.js +18 -10
  24. package/dist/esm/rebill-renewal.entry.js.map +1 -1
  25. package/dist/rebill-web-components-sdk/{p-b3a695df.entry.js → p-11b3fc35.entry.js} +2 -2
  26. package/dist/rebill-web-components-sdk/p-11b3fc35.entry.js.map +1 -0
  27. package/dist/rebill-web-components-sdk/{p-648d0204.entry.js → p-4b4e2e73.entry.js} +2 -2
  28. package/dist/rebill-web-components-sdk/p-BTZ7D7jU.js.map +1 -1
  29. package/dist/rebill-web-components-sdk/p-BXKxstSq.js +2 -0
  30. package/dist/rebill-web-components-sdk/p-BXKxstSq.js.map +1 -0
  31. package/dist/rebill-web-components-sdk/rebill-renewal.entry.esm.js.map +1 -1
  32. package/dist/rebill-web-components-sdk/rebill-web-components-sdk.esm.js +1 -1
  33. package/dist/types/models/enums/payment-status.enum.d.ts +1 -0
  34. package/package.json +1 -1
  35. package/dist/cjs/payment-error-mapper-DMma7xTr.js.map +0 -1
  36. package/dist/components/p-tTo6r99B.js.map +0 -1
  37. package/dist/esm/payment-error-mapper-CtMCCzwd.js.map +0 -1
  38. package/dist/rebill-web-components-sdk/p-GqGHZ54B.js +0 -2
  39. package/dist/rebill-web-components-sdk/p-GqGHZ54B.js.map +0 -1
  40. package/dist/rebill-web-components-sdk/p-b3a695df.entry.js.map +0 -1
  41. /package/dist/rebill-web-components-sdk/{p-648d0204.entry.js.map → p-4b4e2e73.entry.js.map} +0 -0
@@ -51,6 +51,7 @@ exports.PaymentMessageE = void 0;
51
51
  PaymentMessageE["APM_ERROR_BANK_TRANSFER"] = "apm_error_bank_transfer";
52
52
  PaymentMessageE["PROVIDER_ERROR"] = "provider_error";
53
53
  PaymentMessageE["BANK_REJECTED"] = "bank_rejected";
54
+ PaymentMessageE["DO_NOT_HONOR"] = "do_not_honor";
54
55
  PaymentMessageE["CALL_BANK_FOR_AUTHORIZE"] = "call_bank_for_authorize";
55
56
  PaymentMessageE["REQUIRED_3DS"] = "required_3ds";
56
57
  PaymentMessageE["BLACKLISTED"] = "blacklisted";
@@ -168,6 +169,7 @@ class PaymentErrorMapper {
168
169
  [exports.PaymentMessageE.APM_ERROR_BANK_TRANSFER]: i18n_service.I18nService.translate('paymentErrors.APMErrorBankTransfer'),
169
170
  [exports.PaymentMessageE.PROVIDER_ERROR]: i18n_service.I18nService.translate('paymentErrors.providerError'),
170
171
  [exports.PaymentMessageE.BANK_REJECTED]: i18n_service.I18nService.translate('paymentErrors.bankRejected'),
172
+ [exports.PaymentMessageE.DO_NOT_HONOR]: i18n_service.I18nService.translate('paymentErrors.bankRejected'),
171
173
  [exports.PaymentMessageE.FRAUD_HIGH_RISK]: i18n_service.I18nService.translate('paymentErrors.fraudHighRisk'),
172
174
  [exports.PaymentMessageE.CALL_BANK_FOR_AUTHORIZE]: i18n_service.I18nService.translate('paymentErrors.callBankForAuthorize'),
173
175
  [exports.PaymentMessageE.REQUIRED_3DS]: i18n_service.I18nService.translate('paymentErrors.required3ds'),
@@ -203,6 +205,6 @@ class PaymentErrorMapper {
203
205
 
204
206
  exports.PaymentErrorMapper = PaymentErrorMapper;
205
207
  exports.generateIdempotencyKey = generateIdempotencyKey;
206
- //# sourceMappingURL=payment-error-mapper-DMma7xTr.js.map
208
+ //# sourceMappingURL=payment-error-mapper-BBaiDgUx.js.map
207
209
 
208
- //# sourceMappingURL=payment-error-mapper-DMma7xTr.js.map
210
+ //# sourceMappingURL=payment-error-mapper-BBaiDgUx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-error-mapper-BBaiDgUx.js","sources":["src/api/entities/checkout/types.ts","src/models/enums/payment-status.enum.ts","src/utils/generate-idempotency-key.ts","src/utils/payment-error-mapper.ts"],"sourcesContent":["import { PaymentMethodNameE } from '../../../models/enums/payment-method-name.enum';\nimport { STATUS_REQ_CHECKOUT_APM } from '../../../models/enums/status-req-checkout-apm.enum';\n\n// Checkout request status\nexport enum CheckoutStatusE {\n PENDING = 'PENDING',\n APPROVED = 'APPROVED',\n REJECTED = 'REJECTED',\n ERROR = 'ERROR',\n}\n\n// APM Transaction interface (based on documentation)\nexport interface APMTransaction {\n name?: { text: string; language: string }[];\n description?: { text: string; language: string }[];\n isPriceFixed?: boolean;\n tiers?: any[];\n plan?: any;\n quantity: number;\n amount?: number;\n currency?: string;\n productId?: string;\n planId?: string;\n couponCode?: string;\n}\n\n// APM Customer interface (based on documentation)\nexport interface APMCustomer {\n firstName: string;\n lastName: string;\n email: string;\n phone: {\n countryCode: string;\n number: string;\n };\n shippingAddress?: APMAddress;\n}\n\n// APM Address interface (based on documentation)\nexport interface APMAddress {\n country: string;\n state: string;\n city: string;\n zipCode: string;\n lineOne: string;\n lineTwo?: string;\n}\n\n// APM Redirect URLs interface (based on documentation)\nexport interface APMRedirect {\n approved: string;\n rejected: string;\n}\n\n// Metadata interface\nexport interface Metadata {\n [key: string]: unknown;\n}\n\n// Create APM checkout request interface (based on documentation)\nexport interface CreateAPMCheckoutRequest {\n transaction: APMTransaction;\n method: PaymentMethodNameE;\n customer?: APMCustomer; // Optional for authenticated users\n billingDetails?: {\n address: {\n lineOne: string;\n lineTwo?: string;\n city: string;\n state: string;\n zipCode: string;\n country: string;\n };\n identification: {\n type: string;\n value: string;\n };\n };\n redirect: APMRedirect;\n paymentMetadata?: Metadata;\n subscriptionMetadata?: Metadata;\n customAttributes?: {\n bank?: string;\n };\n targetCurrency?: string;\n}\n\n// Legacy interfaces for backward compatibility\nexport interface Transaction {\n amount: number;\n currency: string;\n description: string;\n}\n\nexport interface Customer {\n email: string;\n name: string;\n phone: string;\n documentType?: string;\n documentNumber?: string;\n shippingAddress: Address;\n}\n\nexport interface Address {\n lineOne: string;\n lineTwo?: string;\n city: string;\n state: string;\n zipCode: string;\n country: string;\n}\n\nexport interface Redirect {\n successUrl: string;\n failureUrl: string;\n cancelUrl: string;\n}\n\nexport interface CreateCardCheckoutRequest {\n transaction: {\n quantity: number;\n currency?: string;\n amount?: number;\n couponCode?: string;\n };\n installments?: number;\n cardTokenId?: string | null; // Optional, if card is saved\n cardId?: string | null; // Optional, if card is saved\n customer?: {\n firstName: string;\n lastName: string;\n email: string;\n phone: {\n countryCode: string;\n number: string;\n };\n };\n billingDetails?: {\n address: {\n lineOne: string;\n lineTwo?: string;\n city: string;\n state: string;\n zipCode: string;\n country: string;\n };\n identification: {\n type: string;\n value: string;\n };\n };\n paymentMetadata?: {\n bankCode?: string;\n };\n customAttributes?: {\n deviceId?: string;\n };\n saveCard?: boolean;\n}\nexport interface CreateCardCheckoutResponse {\n traceId: string;\n date: string;\n result?: {\n paymentId: string;\n status: CheckoutStatusE;\n subscriptionId: string;\n cardId: string;\n cardLastFour: string;\n customerId: string;\n statusDetail?: string;\n type?: string;\n };\n error: {\n traceId: string;\n date: string;\n error: {\n message: string;\n type: string;\n };\n statusCode: number;\n };\n}\nexport interface Card {\n cardHolderName: string;\n cardExpirationMonth: string;\n cardExpirationYear: string;\n securityCode: string;\n number: string;\n identification: {\n type: string;\n value: string;\n };\n saveCard: boolean;\n}\n// Instruction interface for payment reference\nexport interface PaymentInstruction {\n text: string;\n language: string;\n}\n\n// Bank transfer data interface\nexport interface BankTransferData {\n bbvAccountNumber?: string;\n account: string; // CLABE\n bankName: string;\n reference: string;\n}\n\n// Checkout data interface (provider-specific)\nexport interface CheckoutData {\n // For QR codes\n qrCode?: string;\n\n // For barcodes\n barcode?: string;\n\n // For bank transfer payments (new - multiple data sets)\n bankTransferData?: BankTransferData[];\n\n // For reference payments\n referenceId?: string;\n instructions?: PaymentInstruction[];\n\n // For redirect payments\n url?: string;\n message?: string;\n // For vouchers\n voucherUrl?: string;\n\n // Additional provider-specific data\n [key: string]: any;\n}\n\n// Checkout result interface\nexport interface CheckoutResult {\n checkoutRequestId: string;\n status: CheckoutStatusE;\n data: CheckoutData;\n}\n\n// Error interface\nexport interface CheckoutError {\n message: string;\n type: string;\n}\n\n// Bank interface for PSE payments\nexport interface Bank {\n code: string;\n name: string;\n}\n\n// Required fields request interface\nexport interface RequiredFieldsRequest {\n currency: string;\n method: string;\n bin?: number;\n}\n\n// Required fields response interface\nexport type RequiredFieldsResponse = {\n name: string;\n values?: {\n code: string;\n name: string;\n }[];\n}[];\n\n// Create APM checkout response interface\nexport interface CreateAPMCheckoutResponse {\n traceId: string;\n date: string;\n result?: CheckoutResult;\n error?: CheckoutError;\n}\n\nexport interface PaymentMethod {\n name: string;\n type: string;\n}\n\nexport interface TrackingData {\n locale: string;\n utmTerm: string;\n referrer: string;\n ipAddress: string;\n}\nexport interface Source {\n source: string;\n version: string;\n}\n\nexport interface APMSession {\n country: string;\n createdAt: string;\n deviceId: string;\n email: string | null;\n expiresAt: string;\n id: string;\n isCreatedDuringCheckout: boolean;\n metadata: Record<string, unknown>;\n organizationId: string;\n paymentLinkId: string;\n paymentMethods: PaymentMethod[];\n planId: string;\n priceId: string;\n productId: string | null;\n providerKey: string;\n source: Source;\n status: string;\n trackingData: TrackingData;\n updatedAt: string;\n}\n\nexport interface CheckoutRequestPayment {\n id: string;\n createdAt: string;\n updatedAt: string;\n organizationId: string;\n amount: number;\n currency: string;\n customer: {\n id: string;\n firstName: string;\n lastName: string;\n email: string;\n phoneNumbers: {\n number: string;\n countryCode: string;\n }[];\n };\n status: string;\n metadata: Record<string, unknown>;\n paymentMethodType: string;\n paymentMethodMetadata: Record<string, unknown>;\n card: {\n id: string;\n name: string;\n expiration: {\n month: string;\n year: string;\n };\n lastFour: string;\n brand: string;\n };\n quantity: number;\n paymentProviderReference: string | null;\n paymentProviderDescription: string | null;\n installments: number | null;\n priceFixedIn: string | null;\n conversionRate: number | null;\n couponId: string | null;\n description: [\n {\n text: string;\n language: string;\n },\n ];\n processingMode: string;\n processingFee: number | null;\n country: string;\n timezone: string;\n}\n\nexport interface CheckoutRequestPaymentAPM {\n checkoutRequestId: string;\n status: STATUS_REQ_CHECKOUT_APM;\n type: string;\n data: {\n message: string;\n url: string;\n };\n session: APMSession;\n payment: CheckoutRequestPayment | null;\n}\n","export enum PaymentMessageE {\n PENDING = 'pending',\n APPROVED = 'approved',\n REJECTED = 'rejected',\n DECLINED = 'declined',\n ERROR = 'error',\n REFUNDED = 'refunded',\n CANCELLED = 'cancelled',\n PARTIALLY_REFUNDED = 'partially_refunded',\n EXPIRED = 'expired',\n GENERIC_REJECT = 'generic_reject',\n INVALID_CARD = 'invalid_card',\n INVALID_CARD_NUMBER = 'invalid_card_number',\n INVALID_CARD_HOLDER_NAME = 'invalid_card_holder_name',\n INVALID_CARD_EXPIRATION_DATE = 'invalid_card_expiration_date',\n INVALID_CARD_CVC = 'invalid_card_cvc',\n INSUFFICIENT_FUNDS = 'insufficient_funds',\n\n BLACKLISTED_CARD = 'blacklisted_card',\n INVALID_CUSTOMER_EMAIL = 'invalid_customer_email',\n INVALID_CUSTOMER_PHONE = 'invalid_customer_phone',\n INVALID_CUSTOMER_BILLING_ADDRESS = 'invalid_customer_billing_address',\n REQUIRED_CUSTOMER_EMAIL = 'required_customer_email',\n REQUIRED_CUSTOMER_PHONE = 'required_customer_phone',\n REQUIRED_CUSTOMER_BILLING_ADDRESS = 'required_customer_billing_address',\n INVALID_CHECKOUT_REQUEST = 'invalid_checkout_request',\n UNAVAILABLE_PAYMENT_METHOD = 'unavailable_payment_method',\n INVALID_AMOUNT = 'invalid_amount',\n INVALID_CURRENCY = 'invalid_currency',\n INVALID_COUNTRY = 'invalid_country',\n MAX_ATTEMPTS = 'max_attempts',\n PAYMENT_EXPIRED = 'payment_expired',\n FRAUD_HIGH_RISK = 'fraud_high_risk',\n INTERNAL_ERROR = 'internal_error',\n INVALID_SESSION = 'invalid_session',\n APM_MESSAGE_ERROR = 'apm_message_error',\n APM_ERROR_GENERIC = 'apm_error_generic',\n APM_ERROR_BANK_TRANSFER = 'apm_error_bank_transfer',\n PROVIDER_ERROR = 'provider_error',\n BANK_REJECTED = 'bank_rejected',\n DO_NOT_HONOR = 'do_not_honor',\n CALL_BANK_FOR_AUTHORIZE = 'call_bank_for_authorize',\n REQUIRED_3DS = 'required_3ds',\n BLACKLISTED = 'blacklisted',\n HARD_DECLINE = 'hard-decline',\n SOFT_DECLINE = 'soft-decline',\n HUMAN_DECLINE = 'human-decline',\n INTERNAL = 'internal',\n INVALID_CARD_TOKENIZE_COUNTRY = 'invalid_card_tokenize_country',\n INVALID_CUSTOMER_ADDRESS = 'invalid_customer_address',\n INVALID_CUSTOMER_CITY = 'invalid_customer_city',\n INVALID_CUSTOMER_STATE = 'invalid_customer_state',\n INVALID_CUSTOMER_ZIP = 'invalid_customer_zip',\n INVALID_CUSTOMER_COUNTRY = 'invalid_customer_country',\n INVALID_CUSTOMER_DOCUMENT = 'invalid_customer_document',\n INVALID_CUSTOMER_DOCUMENT_NUMBER = 'invalid_customer_document_number',\n INVALID_CUSTOMER_DOCUMENT_TYPE = 'invalid_customer_document_type',\n INVALID_CHECKOUT_PAYMENT_METHOD = 'invalid_checkout_payment_method',\n REQUIRED_CUSTOMER_ADDRESS = 'required_customer_address',\n REQUIRED_CUSTOMER_CITY = 'required_customer_city',\n REQUIRED_CUSTOMER_STATE = 'required_customer_state',\n REQUIRED_CUSTOMER_ZIP = 'required_customer_zip',\n REQUIRED_CUSTOMER_COUNTRY = 'required_customer_country',\n REQUIRED_CUSTOMER_DOCUMENT = 'required_customer_document',\n REQUIRED_CUSTOMER_DOCUMENT_NUMBER = 'required_customer_document_number',\n REQUIRED_CUSTOMER_DOCUMENT_TYPE = 'required_customer_document_type',\n EXPIRED_CARD = 'expired_card',\n SANDBOX_ERROR = 'sandbox_error',\n}\n","export const generateIdempotencyKey = () => {\n return `idmp_${Date.now()}_${Math.random().toString(36).substring(2, 11)}`;\n};\n","import { I18nService } from '../i18n/i18n.service';\nimport { PAYMENT_METHOD_ENUM } from '../models/enums/payment-methods.enum';\nimport { PaymentMessageE } from '../models/enums/payment-status.enum';\n\nexport interface AlertErrorKeys {\n alertTitle?: PaymentMessageE;\n message: PaymentMessageE;\n}\n\n//currency country\n\nexport class PaymentErrorMapper {\n static getErrorMessage(\n errorMessageKey: AlertErrorKeys['message'] | null,\n paymentMethod: PAYMENT_METHOD_ENUM,\n currencyCountry?: string,\n ): string {\n if (\n !errorMessageKey ||\n !Object.values(PaymentMessageE).includes(errorMessageKey as PaymentMessageE) ||\n errorMessageKey === PaymentMessageE.GENERIC_REJECT\n ) {\n if (paymentMethod === PAYMENT_METHOD_ENUM.CARD) {\n return I18nService.translate('paymentErrors.genericErrorCard');\n }\n if (paymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER) {\n if (currencyCountry === 'BR') {\n return I18nService.translate('paymentErrors.genericErrorMessagePIX');\n }\n if (currencyCountry === 'AR') {\n return I18nService.translate('paymentErrors.genericErrorMessageQR');\n }\n if (currencyCountry === 'CO') {\n return I18nService.translate('paymentErrors.genericErrorMessagePSE');\n }\n return I18nService.translate('paymentErrors.genericErrorMessageBankTransfer');\n }\n return I18nService.translate('paymentErrors.genericErrorMessage');\n }\n return PaymentErrorMapper.getMessage(errorMessageKey);\n }\n\n static getErrorTitle(\n paymentMethod: PAYMENT_METHOD_ENUM,\n currencyCountry: string,\n errorTitleKey?: AlertErrorKeys['alertTitle'],\n ): string {\n if (errorTitleKey && !(errorTitleKey in PaymentMessageE)) {\n return PaymentErrorMapper.getMessage(errorTitleKey);\n }\n if (paymentMethod === PAYMENT_METHOD_ENUM.CARD) {\n return I18nService.translate('paymentErrors.genericErrorTitleCard');\n }\n if (paymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER) {\n if (currencyCountry === 'BR') {\n return I18nService.translate('paymentErrors.genericErrorTitlePIX');\n }\n if (currencyCountry === 'AR') {\n return I18nService.translate('paymentErrors.genericErrorTitleQR');\n }\n if (currencyCountry === 'CO') {\n return I18nService.translate('paymentErrors.genericErrorTitlePSE');\n }\n }\n return I18nService.translate('paymentErrors.genericErrorTitleBankTransfer');\n }\n\n private static getMessage(errorMessageKey: PaymentMessageE): string {\n const messageMap: Record<PaymentMessageE, string> = {\n [PaymentMessageE.PENDING]: I18nService.translate('paymentErrors.pending'),\n [PaymentMessageE.APPROVED]: I18nService.translate('paymentErrors.approved'),\n [PaymentMessageE.REJECTED]: I18nService.translate('paymentErrors.rejected'),\n [PaymentMessageE.DECLINED]: I18nService.translate('paymentErrors.declined'),\n [PaymentMessageE.ERROR]: I18nService.translate('paymentErrors.error'),\n [PaymentMessageE.REFUNDED]: I18nService.translate('paymentErrors.refunded'),\n [PaymentMessageE.CANCELLED]: I18nService.translate('paymentErrors.cancelled'),\n [PaymentMessageE.PARTIALLY_REFUNDED]: I18nService.translate(\n 'paymentErrors.partiallyRefunded',\n ),\n [PaymentMessageE.EXPIRED]: I18nService.translate('paymentErrors.expired'),\n [PaymentMessageE.GENERIC_REJECT]: I18nService.translate('paymentErrors.genericReject'),\n [PaymentMessageE.INVALID_CARD]: I18nService.translate('paymentErrors.invalidCard'),\n [PaymentMessageE.INVALID_CARD_NUMBER]: I18nService.translate(\n 'paymentErrors.invalidCardNumber',\n ),\n [PaymentMessageE.INVALID_CARD_HOLDER_NAME]: I18nService.translate(\n 'paymentErrors.invalidCardHolderName',\n ),\n [PaymentMessageE.INVALID_CARD_EXPIRATION_DATE]: I18nService.translate(\n 'paymentErrors.invalidCardExpirationDate',\n ),\n [PaymentMessageE.INVALID_CARD_CVC]: I18nService.translate('paymentErrors.invalidCardCvc'),\n [PaymentMessageE.INSUFFICIENT_FUNDS]: I18nService.translate(\n 'paymentErrors.insufficientFunds',\n ),\n [PaymentMessageE.BLACKLISTED_CARD]: I18nService.translate('paymentErrors.blacklistedCard'),\n [PaymentMessageE.INVALID_CUSTOMER_EMAIL]: I18nService.translate(\n 'paymentErrors.invalidCustomerEmail',\n ),\n [PaymentMessageE.INVALID_CUSTOMER_PHONE]: I18nService.translate(\n 'paymentErrors.invalidCustomerPhone',\n ),\n [PaymentMessageE.INVALID_CUSTOMER_BILLING_ADDRESS]: I18nService.translate(\n 'paymentErrors.invalidCustomerBillingAddress',\n ),\n [PaymentMessageE.REQUIRED_CUSTOMER_EMAIL]: I18nService.translate(\n 'paymentErrors.requiredCustomerEmail',\n ),\n [PaymentMessageE.REQUIRED_CUSTOMER_PHONE]: I18nService.translate(\n 'paymentErrors.requiredCustomerPhone',\n ),\n [PaymentMessageE.REQUIRED_CUSTOMER_BILLING_ADDRESS]: I18nService.translate(\n 'paymentErrors.requiredCustomerBillingAddress',\n ),\n [PaymentMessageE.INVALID_CHECKOUT_REQUEST]: I18nService.translate(\n 'paymentErrors.invalidCheckoutRequest',\n ),\n [PaymentMessageE.UNAVAILABLE_PAYMENT_METHOD]: I18nService.translate(\n 'paymentErrors.unavailablePaymentMethod',\n ),\n [PaymentMessageE.INVALID_AMOUNT]: I18nService.translate('paymentErrors.invalidAmount'),\n [PaymentMessageE.INVALID_CURRENCY]: I18nService.translate('paymentErrors.invalidCurrency'),\n [PaymentMessageE.INVALID_COUNTRY]: I18nService.translate('paymentErrors.invalidCountry'),\n [PaymentMessageE.MAX_ATTEMPTS]: I18nService.translate('paymentErrors.maxAttempts'),\n [PaymentMessageE.PAYMENT_EXPIRED]: I18nService.translate('paymentErrors.paymentExpired'),\n\n [PaymentMessageE.INTERNAL_ERROR]: I18nService.translate('paymentErrors.internalError'),\n [PaymentMessageE.INVALID_SESSION]: I18nService.translate('paymentErrors.invalidSession'),\n [PaymentMessageE.APM_MESSAGE_ERROR]: I18nService.translate('paymentErrors.APMMessageError'),\n [PaymentMessageE.APM_ERROR_GENERIC]: I18nService.translate('paymentErrors.APMErrorGeneric'),\n [PaymentMessageE.APM_ERROR_BANK_TRANSFER]: I18nService.translate(\n 'paymentErrors.APMErrorBankTransfer',\n ),\n [PaymentMessageE.PROVIDER_ERROR]: I18nService.translate('paymentErrors.providerError'),\n [PaymentMessageE.BANK_REJECTED]: I18nService.translate('paymentErrors.bankRejected'),\n [PaymentMessageE.DO_NOT_HONOR]: I18nService.translate('paymentErrors.bankRejected'),\n\n [PaymentMessageE.FRAUD_HIGH_RISK]: I18nService.translate('paymentErrors.fraudHighRisk'),\n [PaymentMessageE.CALL_BANK_FOR_AUTHORIZE]: I18nService.translate(\n 'paymentErrors.callBankForAuthorize',\n ),\n [PaymentMessageE.REQUIRED_3DS]: I18nService.translate('paymentErrors.required3ds'),\n [PaymentMessageE.BLACKLISTED]: I18nService.translate('paymentErrors.blacklisted'),\n [PaymentMessageE.HARD_DECLINE]: I18nService.translate('paymentErrors.hardDecline'),\n [PaymentMessageE.SOFT_DECLINE]: I18nService.translate('paymentErrors.softDecline'),\n [PaymentMessageE.HUMAN_DECLINE]: I18nService.translate('paymentErrors.humanDecline'),\n [PaymentMessageE.INTERNAL]: I18nService.translate('paymentErrors.internal'),\n [PaymentMessageE.INVALID_CARD_TOKENIZE_COUNTRY]: I18nService.translate(\n 'paymentErrors.invalidCardTokenizeCountry',\n ),\n [PaymentMessageE.INVALID_CUSTOMER_ADDRESS]: I18nService.translate(\n 'paymentErrors.invalidCustomerAddress',\n ),\n [PaymentMessageE.INVALID_CUSTOMER_CITY]: I18nService.translate(\n 'paymentErrors.invalidCustomerCity',\n ),\n [PaymentMessageE.INVALID_CUSTOMER_STATE]: I18nService.translate(\n 'paymentErrors.invalidCustomerState',\n ),\n [PaymentMessageE.INVALID_CUSTOMER_ZIP]: I18nService.translate(\n 'paymentErrors.invalidCustomerZip',\n ),\n [PaymentMessageE.INVALID_CUSTOMER_COUNTRY]: I18nService.translate(\n 'paymentErrors.invalidCustomerCountry',\n ),\n [PaymentMessageE.INVALID_CUSTOMER_DOCUMENT]: I18nService.translate(\n 'paymentErrors.invalidCustomerDocument',\n ),\n [PaymentMessageE.INVALID_CUSTOMER_DOCUMENT_NUMBER]: I18nService.translate(\n 'paymentErrors.invalidCustomerDocumentNumber',\n ),\n [PaymentMessageE.INVALID_CUSTOMER_DOCUMENT_TYPE]: I18nService.translate(\n 'paymentErrors.invalidCustomerDocumentType',\n ),\n [PaymentMessageE.INVALID_CHECKOUT_PAYMENT_METHOD]: I18nService.translate(\n 'paymentErrors.invalidCheckoutPaymentMethod',\n ),\n [PaymentMessageE.REQUIRED_CUSTOMER_ADDRESS]: I18nService.translate(\n 'paymentErrors.requiredCustomerAddress',\n ),\n [PaymentMessageE.REQUIRED_CUSTOMER_CITY]: I18nService.translate(\n 'paymentErrors.requiredCustomerCity',\n ),\n [PaymentMessageE.REQUIRED_CUSTOMER_STATE]: I18nService.translate(\n 'paymentErrors.requiredCustomerState',\n ),\n [PaymentMessageE.REQUIRED_CUSTOMER_ZIP]: I18nService.translate(\n 'paymentErrors.requiredCustomerZip',\n ),\n [PaymentMessageE.REQUIRED_CUSTOMER_COUNTRY]: I18nService.translate(\n 'paymentErrors.requiredCustomerCountry',\n ),\n [PaymentMessageE.REQUIRED_CUSTOMER_DOCUMENT]: I18nService.translate(\n 'paymentErrors.requiredCustomerDocument',\n ),\n [PaymentMessageE.REQUIRED_CUSTOMER_DOCUMENT_NUMBER]: I18nService.translate(\n 'paymentErrors.requiredCustomerDocumentNumber',\n ),\n [PaymentMessageE.REQUIRED_CUSTOMER_DOCUMENT_TYPE]: I18nService.translate(\n 'paymentErrors.requiredCustomerDocumentType',\n ),\n [PaymentMessageE.EXPIRED_CARD]: I18nService.translate('paymentErrors.expiredCard'),\n [PaymentMessageE.SANDBOX_ERROR]: I18nService.translate('paymentErrors.sandboxError'),\n };\n\n return messageMap[errorMessageKey] || I18nService.translate('paymentErrors.genericError');\n }\n}\n"],"names":["CheckoutStatusE","PaymentMessageE","PAYMENT_METHOD_ENUM","I18nService"],"mappings":";;;;AAGA;AACYA;AAAZ,CAAA,UAAY,eAAe,EAAA;AACzB,IAAA,eAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,eAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,eAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,eAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACjB,CAAC,EALWA,uBAAe,KAAfA,uBAAe,GAK1B,EAAA,CAAA,CAAA;;ACTWC;AAAZ,CAAA,UAAY,eAAe,EAAA;AACzB,IAAA,eAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,eAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,eAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,eAAA,CAAA,UAAA,CAAA,GAAA,UA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oCAAoC,CACrC;YACD,CAACF,uBAAe,CAAC,uBAAuB,GAAGE,wBAAW,CAAC,SAAS,CAC9D,qCAAqC,CACtC;YACD,CAACF,uBAAe,CAAC,qBAAqB,GAAGE,wBAAW,CAAC,SAAS,CAC5D,mCAAmC,CACpC;YACD,CAACF,uBAAe,CAAC,yBAAyB,GAAGE,wBAAW,CAAC,SAAS,CAChE,uCAAuC,CACxC;YACD,CAACF,uBAAe,CAAC,0BAA0B,GAAGE,wBAAW,CAAC,SAAS,CACjE,wCAAwC,CACzC;YACD,CAACF,uBAAe,CAAC,iCAAiC,GAAGE,wBAAW,CAAC,SAAS,CACxE,8CAA8C,CAC/C;YACD,CAACF,uBAAe,CAAC,+BAA+B,GAAGE,wBAAW,CAAC,SAAS,CACtE,4CAA4C,CAC7C;YACD,CAACF,uBAAe,CAAC,YAAY,GAAGE,wBAAW,CAAC,SAAS,CAAC,2BAA2B,CAAC;YAClF,CAACF,uBAAe,CAAC,aAAa,GAAGE,wBAAW,CAAC,SAAS,CAAC,4BAA4B,CAAC;SACrF;QAED,OAAO,UAAU,CAAC,eAAe,CAAC,IAAIA,wBAAW,CAAC,SAAS,CAAC,4BAA4B,CAAC;;AAE5F;;;;;"}
@@ -3,7 +3,7 @@
3
3
  var index$1 = require('./index-C-VTnc0I.js');
4
4
  var index_esm = require('./index.esm-4vgDEvoy.js');
5
5
  var index = require('./index-Br1gvsLU.js');
6
- var paymentErrorMapper = require('./payment-error-mapper-DMma7xTr.js');
6
+ var paymentErrorMapper = require('./payment-error-mapper-BBaiDgUx.js');
7
7
  var i18n_service = require('./i18n.service-Cm0YXiC0.js');
8
8
  var statusReqCheckoutApm_enum = require('./status-req-checkout-apm.enum-BcCXZY86.js');
9
9
  var breakpoint = require('./breakpoint-CWd4pcNv.js');
@@ -3,7 +3,7 @@
3
3
  var index = require('./index-C-VTnc0I.js');
4
4
  var index_esm = require('./index.esm-4vgDEvoy.js');
5
5
  var index$1 = require('./index-Br1gvsLU.js');
6
- var paymentErrorMapper = require('./payment-error-mapper-DMma7xTr.js');
6
+ var paymentErrorMapper = require('./payment-error-mapper-BBaiDgUx.js');
7
7
  var i18n_service = require('./i18n.service-Cm0YXiC0.js');
8
8
  var statusReqCheckoutApm_enum = require('./status-req-checkout-apm.enum-BcCXZY86.js');
9
9
  var renewal_store = require('./renewal.store-Cy9yhhws.js');
@@ -547,15 +547,23 @@ const RebillRenewal = class {
547
547
  'billing-zip': errors['billing-zip'],
548
548
  } }))), !this.isAPMCheckoutVisible &&
549
549
  this.cardMode === 'input' &&
550
- requiredFieldsMappers.isFieldRequired('phoneNumber', this.currentRequiredFields) && (index.h("div", { class: "animated-component fade-in" }, index.h("user-information-phone", { error: errors?.phoneNumber }))), this.isAPMCheckoutVisible && (index.h("apm-checkout", { paymentMethod: this.currentPaymentMethod, referenceId: this.currentPaymentMethod === i18n_service.PAYMENT_METHOD_ENUM.CASH
551
- ? this.checkoutResponse.result.data.referenceId
552
- : undefined, qrCodeData: this.currentPaymentMethod === i18n_service.PAYMENT_METHOD_ENUM.BANK_TRANSFER
553
- ? this.checkoutResponse.result.data.qrCode
554
- : undefined, code: this.checkoutResponse?.result?.data?.code, providerName: renewal_store.renewalState.data.organization?.name || '', expirationDate: (() => {
555
- const expirationDate = new Date();
556
- expirationDate.setDate(expirationDate.getDate() + 30);
557
- return expirationDate.toISOString();
558
- })(), country: renewal_store.renewalState.data.price.country, redirectUrl: this.checkoutResponse.result.data.url, checkoutRequestId: this.checkoutResponse?.result?.checkoutRequestId, bearerToken: this.checkoutResponse?.result?.data?.bearerToken, onPaymentStatusChange: event => this.handlePaymentStatusChange(event.detail) })), breakpoint.isBreakpointBelow(this.breakpoint, breakpoint.BREAKPOINT_ENUM.DESKTOP) &&
550
+ requiredFieldsMappers.isFieldRequired('phoneNumber', this.currentRequiredFields) && (index.h("div", { class: "animated-component fade-in" }, index.h("user-information-phone", { error: errors?.phoneNumber }))), this.isAPMCheckoutVisible &&
551
+ (() => {
552
+ const isBoleto = this.currentPaymentMethod === i18n_service.PAYMENT_METHOD_ENUM.CASH &&
553
+ renewal_store.renewalState.data?.price?.country === 'BR' &&
554
+ this.checkoutResponse?.result?.data?.barcode;
555
+ return (index.h("apm-checkout", { paymentMethod: this.currentPaymentMethod, barcode: isBoleto
556
+ ? this.checkoutResponse?.result?.data?.barcode
557
+ : undefined, referenceId: this.currentPaymentMethod === i18n_service.PAYMENT_METHOD_ENUM.CASH && !isBoleto
558
+ ? this.checkoutResponse?.result?.data?.referenceId
559
+ : undefined, qrCodeData: this.currentPaymentMethod === i18n_service.PAYMENT_METHOD_ENUM.BANK_TRANSFER
560
+ ? this.checkoutResponse?.result?.data?.qrCode
561
+ : undefined, code: this.checkoutResponse?.result?.data?.code, providerName: renewal_store.renewalState.data.organization?.name || '', expirationDate: (() => {
562
+ const expirationDate = new Date();
563
+ expirationDate.setDate(expirationDate.getDate() + 30);
564
+ return expirationDate.toISOString();
565
+ })(), country: renewal_store.renewalState.data.price.country, redirectUrl: this.checkoutResponse?.result?.data?.url, checkoutRequestId: this.checkoutResponse?.result?.checkoutRequestId, bearerToken: this.checkoutResponse?.result?.data?.bearerToken, onPaymentStatusChange: event => this.handlePaymentStatusChange(event.detail) }));
566
+ })(), breakpoint.isBreakpointBelow(this.breakpoint, breakpoint.BREAKPOINT_ENUM.DESKTOP) &&
559
567
  renderRenewalSummary({
560
568
  displayedComponents: 'summary',
561
569
  }), index.h("div", { style: { display: 'flex', flexDirection: 'column', gap: '16px' } }, !this.isAPMCheckoutVisible && (index.h("payment-button", { paymentMethod: this.currentPaymentMethod, isLoading: this.isSubmitting, isRenewal: true, trialPeriodDays: renewal_store.renewalState.data.subscription.trialPeriodDays, redirectUrl: !!this.checkoutResponse?.result?.data?.url, timeToRedirect: 5000, country: renewal_store.renewalState.data.price.country, isDisabled: renewal_store.renewalState.fetchingInstallments, onSubmit: () => submit() })), index.h("rebill-alert", { type: "secure", variant: "variant-secure", icon: "lock-outline", message: i18n_service.I18nService.translate('otp.secureMessage') }))), index.h("rebill-footer", { style: {
@@ -1 +1 @@
1
- {"version":3,"file":"rebill-renewal.entry.cjs.js","sources":["src/components/renewal/rebill-renewal.css?tag=rebill-renewal","src/components/renewal/rebill-renewal.tsx"],"sourcesContent":["@import '../../styles/variables.css';\n\n@media (max-width: 1024px) {\n .rebill-checkout-renewal {\n flex-direction: column;\n gap: 0;\n justify-content: flex-start;\n background: var(--rebill-color-background);\n padding: 20px;\n }\n .right-section .left-section {\n width: 100%;\n height: 100%;\n background: var(--rebill-color-background);\n }\n .checkout-form-section {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n gap: 24px;\n height: 100%;\n margin-top: 24px;\n }\n .otp-container {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n gap: 24px;\n }\n}\n\n@media (min-width: 1025px) {\n .rebill-checkout-renewal {\n width: 100vw;\n min-height: 100vh;\n display: flex;\n flex-direction: row;\n justify-content: center;\n overflow-y: auto;\n }\n\n .left-section {\n display: flex;\n width: 60%;\n background: var(--rebill-color-background-left);\n justify-content: space-around;\n }\n\n .right-section {\n display: flex;\n padding-top: 72px;\n width: 40%;\n background: var(--rebill-color-background-right);\n position: sticky;\n top: 0;\n\n justify-content: center;\n }\n\n .checkout-form-section {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n margin-bottom: 36px;\n margin-top: 24px;\n gap: 32px;\n }\n .left-section-container {\n max-width: 450px;\n min-width: 450px;\n margin: 2.5rem 2rem 1.5rem 2rem;\n display: flex;\n flex-direction: column;\n }\n\n .checkout-summary-section {\n max-width: 450px;\n min-width: 350px;\n margin: 0rem 2rem;\n background: var(--rebill-color-background-right);\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n width: 100%;\n }\n\n .checkout-form-section user-information,\n .checkout-form-section payment-method-selector,\n .checkout-form-section rebill-address,\n .checkout-summary-section rebill-summary {\n width: 100%;\n }\n\n /* Google Maps Autocomplete Styles */\n .pac-container {\n border-radius: 4px;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);\n border: 1px solid #e0e0e0;\n margin-top: 4px;\n font-family: inherit;\n }\n\n .pac-item {\n padding: 10px 12px;\n cursor: pointer;\n border-top: none;\n }\n\n .pac-item:first-child {\n border-top: none;\n }\n\n .pac-item:hover {\n background-color: #f5f5f5;\n }\n\n .pac-item-query {\n font-weight: 500;\n }\n\n .pac-icon {\n display: none;\n }\n}\n\n.payment-button-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-bottom: 16px;\n}\n/* Animaciones para componentes condicionales */\n.animated-component {\n transition: all 0.3s ease-in-out;\n overflow: visible;\n}\n\n/* Keep overflow hidden only for sliding height animations */\n/* .animated-component.slide-in {\n overflow: hidden;\n} */\n\n.fade-in {\n animation: fadeIn 0.4s ease-in-out;\n}\n\n.slide-in {\n animation: slideIn 0.5s ease-out;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n transform: translateY(-10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes slideIn {\n from {\n opacity: 0;\n transform: translateX(-20px);\n max-height: 0;\n }\n to {\n opacity: 1;\n transform: translateX(0);\n max-height: 450px;\n }\n}\n\n/* Animación para cuando se ocultan los componentes */\n.animated-component.hide {\n animation: fadeOut 0.3s ease-in-out forwards;\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(20px);\n }\n}\n\n/* Test Mode Chip Positioning */\nrebill-mode-sandbox {\n position: fixed;\n bottom: 50px;\n left: 50%;\n transform: translateX(-50%);\n z-index: 1000;\n}\n\n/* Ensure the chip is visible on all screen sizes */\n@media (max-width: 1024px) {\n rebill-test-mode-chip {\n bottom: 46px;\n }\n}\n\n@media (min-width: 1025px) {\n rebill-test-mode-chip {\n bottom: 46px;\n }\n}\n.mode-sandbox-mobile-container {\n display: flex;\n align-items: center;\n width: 100%;\n\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n/* Desktop grande - mantener tamaños originales */\n@media (min-width: 1451px) {\n .left-section-container {\n min-width: 450px;\n margin: 2.5rem 5rem 1.5rem 5rem;\n }\n\n .checkout-summary-section {\n min-width: 450px;\n margin: 0rem 5rem;\n }\n}\n","import { Component, Event, EventEmitter, h, Listen, Prop, State } from '@stencil/core';\nimport * as yup from 'yup';\nimport { api, Country } from '../../api';\nimport { SavedCard } from '../../api/entities/cards/types';\nimport {\n CheckoutStatusE,\n CreateAPMCheckoutRequest,\n CreateAPMCheckoutResponse,\n CreateCardCheckoutRequest,\n} from '../../api/entities/checkout/types';\nimport '../../components/checkout/apm/apm-checkout/apm-checkout';\nimport '../../components/checkout/processing-payment/processing-payment';\nimport { I18nService } from '../../i18n/i18n.service';\n\nimport { PaymentMethodNameE } from '../../models/enums/payment-method-name.enum';\nimport { PAYMENT_METHOD_ENUM } from '../../models/enums/payment-methods.enum';\nimport { PaymentMessageE } from '../../models/enums/payment-status.enum';\nimport { STATUS_REQ_CHECKOUT_APM } from '../../models/enums/status-req-checkout-apm.enum';\nimport { onChange as renewalOnChange, renewalState, RenewalStore } from '../../store/renewal.store';\nimport { BREAKPOINT_ENUM, getBreakpoint, isBreakpointBelow } from '../../utils/breakpoint';\nimport { COLORS_ENUM } from '../../utils/color-class-mapper';\nimport { generateIdempotencyKey } from '../../utils/generate-idempotency-key';\nimport { GoogleMapsService } from '../../utils/google-maps.service';\nimport { AlertErrorKeys, PaymentErrorMapper } from '../../utils/payment-error-mapper';\nimport { PaymentMethodMapper } from '../../utils/payment-method-mapper';\nimport { getFieldValues, isFieldRequired } from '../../utils/required-fields-mappers';\nimport {\n AllRequiredFieldsMap,\n getAllRequiredFieldsRenewal,\n getRequiredFieldsForMethod,\n} from './utils/getRequiredFieldsRenewal';\n\n@Component({\n tag: 'rebill-renewal',\n styleUrl: 'rebill-renewal.css',\n shadow: false,\n})\nexport class RebillRenewal {\n @Prop() renewalData!: string;\n @Prop() renewalToken!: string;\n\n @State() currentPaymentMethod: PAYMENT_METHOD_ENUM = PAYMENT_METHOD_ENUM.CARD;\n @State() isSubmitting: boolean = false;\n @State() isCardSubmitting: boolean = false;\n @State() isCardSuccess: boolean = false;\n @State() errorMessage: AlertErrorKeys | null = null;\n @State() breakpoint: BREAKPOINT_ENUM = BREAKPOINT_ENUM.DESKTOP;\n @State() errorPaymentCard: boolean = false;\n @State() errorPaymentAPM: boolean = false;\n @State() initialData: any = {};\n @State() checkoutResponse: CreateAPMCheckoutResponse | null = null;\n @State() currentApmPaymentMethod: PaymentMethodNameE | null = null;\n @State() countries: Country[] = [];\n @State() allRequiredFields: AllRequiredFieldsMap = {};\n @State() currentRequiredFields: string[] = [];\n @State() errorCardInvalid: boolean = false;\n @State() cardMode: 'input' | 'select' | null = 'select';\n\n @Event() success: EventEmitter<any>;\n @Event() paymentError: EventEmitter<any>;\n @Event() paymentMethodSelected: EventEmitter<PAYMENT_METHOD_ENUM>;\n\n private validationSchema = {\n 'phoneNumber': yup.string().when([], {\n is: () =>\n isFieldRequired('phoneNumber', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.phoneRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-country': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-country', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.countryRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-state': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-state', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.stateRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-address': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-address', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.addressRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-city': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-city', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.cityRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-zip': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-zip', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.zipRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'bankId': yup.string().when([], {\n is: () => isFieldRequired('bankId', this.currentRequiredFields),\n then: schema => schema.required('validation.bankRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'documentType': yup.string().when([], {\n is: () =>\n isFieldRequired('documentType', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.documentTypeRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'documentNumber': yup.string().when([], {\n is: () =>\n isFieldRequired('documentNumber', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => {\n const baseSchema = schema.required('validation.documentNumberRequired').min(7, 'validation.documentInvalid');\n\n // For BR checkout, validate that document number contains only digits\n if (renewalState.data?.price?.country === 'BR') {\n return baseSchema.test(\n 'numeric-only',\n 'validation.documentNumberNumericOnly',\n value => {\n if (!value) return true; // Let required validation handle empty values\n return /^\\d+$/.test(value);\n }\n );\n }\n\n return baseSchema;\n },\n otherwise: schema => schema.notRequired(),\n }),\n };\n\n private resizeHandler = () => {\n this.breakpoint = getBreakpoint(window.innerWidth);\n };\n\n async componentWillLoad() {\n this.resizeHandler();\n window.addEventListener('resize', this.resizeHandler);\n\n const renewalProps =\n typeof this.renewalData === 'string' ? JSON.parse(this.renewalData) : this.renewalData;\n\n RenewalStore.initializeRenewal({\n ...renewalProps,\n token: this.renewalToken,\n });\n\n // Load Google Maps script for address autocomplete\n GoogleMapsService.loadGoogleMapsScript();\n\n // Load countries data\n try {\n const response = await api.data.getCountries();\n this.countries = response.data;\n } catch (error) {\n console.error('Error loading countries:', error);\n }\n\n // Load required fields data\n try {\n this.allRequiredFields = await getAllRequiredFieldsRenewal();\n } catch (error) {\n console.error('Error loading required fields:', error);\n }\n\n if (renewalState.data.paymentMethods.length > 0) {\n let defaultPaymentMethod: PAYMENT_METHOD_ENUM | null = null;\n\n if (renewalState.data.subscription?.paymentMethod) {\n const subscriptionPaymentMethod =\n renewalState.data.subscription.paymentMethod.toLowerCase();\n const mappedMethod =\n subscriptionPaymentMethod === 'card'\n ? PAYMENT_METHOD_ENUM.CARD\n : subscriptionPaymentMethod === 'bank_transfer'\n ? PAYMENT_METHOD_ENUM.BANK_TRANSFER\n : null;\n\n if (mappedMethod) {\n const isAvailable = renewalState.data.paymentMethods.some(pm => pm.type === mappedMethod);\n if (isAvailable) {\n defaultPaymentMethod = mappedMethod;\n }\n }\n }\n\n if (!defaultPaymentMethod) {\n defaultPaymentMethod = renewalState.data.paymentMethods[0].type as PAYMENT_METHOD_ENUM;\n }\n\n this.currentPaymentMethod = defaultPaymentMethod;\n RenewalStore.setSelectedPaymentMethod(defaultPaymentMethod);\n\n if (defaultPaymentMethod !== PAYMENT_METHOD_ENUM.CARD) {\n this.cardMode = 'input';\n RenewalStore.setCardMode('input');\n }\n\n try {\n this.currentRequiredFields = getRequiredFieldsForMethod(\n defaultPaymentMethod,\n this.allRequiredFields,\n ).fields;\n } catch (error) {\n console.error('Error getting required fields for method:', error);\n }\n\n await this.initializeFingerprint(defaultPaymentMethod);\n }\n\n this.initialData = this.getInitialData();\n\n renewalOnChange('cardMode', () => {\n this.cardMode = renewalState.cardMode;\n });\n }\n\n disconnectedCallback() {\n window.removeEventListener('resize', this.resizeHandler);\n }\n\n @Listen('paymentMethodSelected')\n async handlePaymentMethodSelected(event: CustomEvent<PAYMENT_METHOD_ENUM>) {\n event.stopPropagation();\n\n if (this.currentPaymentMethod === event.detail) {\n return;\n }\n\n this.currentPaymentMethod = event.detail;\n RenewalStore.setSelectedPaymentMethod(this.currentPaymentMethod);\n\n // Change cardMode to 'input' if payment method is not CARD\n if (this.currentPaymentMethod !== PAYMENT_METHOD_ENUM.CARD) {\n this.cardMode = 'input';\n RenewalStore.setCardMode('input');\n }\n\n // Update required fields for the new payment method\n try {\n this.currentRequiredFields = getRequiredFieldsForMethod(\n this.currentPaymentMethod,\n this.allRequiredFields,\n ).fields;\n } catch (error) {\n console.error('Error getting required fields for method:', error);\n }\n\n // Note: Fingerprint is handled in componentWillLoad\n\n // Initialize fingerprint for the new payment method\n await this.initializeFingerprint(this.currentPaymentMethod);\n\n this.paymentMethodSelected.emit(event.detail);\n }\n\n private async initializeFingerprint(paymentMethod: PAYMENT_METHOD_ENUM) {\n // Only initialize fingerprint for card payments and if not already generated\n if (paymentMethod === PAYMENT_METHOD_ENUM.CARD && !renewalState.deviceId) {\n try {\n const uuid = crypto.randomUUID();\n const fingerprintResponse = await api.fingerPrint.getFingerPrint(uuid);\n RenewalStore.setDeviceId(uuid);\n const script = fingerprintResponse.result.script;\n const scriptElement = document.createElement('script');\n scriptElement.innerHTML = script;\n document.body.appendChild(scriptElement);\n } catch (error) {\n console.error('Failed to initialize fingerprint:', error);\n }\n }\n }\n\n @Listen('bankSelected')\n handleBankSelected(event: CustomEvent<string>) {\n event.stopPropagation();\n RenewalStore.setSelectedBankId(event.detail);\n }\n\n @Listen('cardSelected')\n handleCardSelected(event: CustomEvent<{ card: SavedCard; cvv?: string }>) {\n const { card, cvv } = event.detail;\n RenewalStore.setSelectedCard(card);\n RenewalStore.setCvv(cvv || '');\n }\n\n private get currentPaymentError(): boolean {\n if (this.currentPaymentMethod === PAYMENT_METHOD_ENUM.CARD) {\n return this.errorPaymentCard;\n } else if (\n this.currentPaymentMethod === PAYMENT_METHOD_ENUM.CASH ||\n this.currentPaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER\n ) {\n return this.errorPaymentAPM;\n }\n return false;\n }\n\n private async handleSubmit(event?: CustomEvent) {\n if (this.isSubmitting) {\n return;\n }\n\n if (this.currentPaymentMethod === PAYMENT_METHOD_ENUM.CARD) {\n await this.handleCardRenewal(event);\n } else {\n await this.handleAPMRenewal(event);\n }\n }\n\n private async handleCardRenewal(event?: CustomEvent) {\n const formData = event?.detail || this.getInitialData();\n\n if (!renewalState.data.cardId && !renewalState.data.cardTokenId) {\n this.errorCardInvalid = true;\n return;\n }\n if (!renewalState.data.cardInformation && !renewalState.data.cardId) {\n this.errorCardInvalid = true;\n return;\n }\n this.errorCardInvalid = false;\n this.isSubmitting = true;\n this.isCardSubmitting = true;\n RenewalStore.setLoading(true);\n\n try {\n const renewalRequest: CreateCardCheckoutRequest = {\n transaction: {\n quantity: 1,\n },\n ...(renewalState.data.cardId && { cardId: renewalState.data.cardId }),\n ...(renewalState.data.cardTokenId && { cardTokenId: renewalState.data.cardTokenId }),\n customAttributes: {\n ...(renewalState.deviceId && { deviceId: renewalState.deviceId }),\n },\n ...(this.cardMode === 'input' && {\n customer: {\n firstName:\n formData.fullName?.split(' ')[0] ||\n renewalState.data.subscription.customerName?.split(' ')[0],\n lastName:\n formData.fullName?.split(' ').slice(1).join(' ') ||\n renewalState.data.subscription.customerName?.split(' ').slice(1).join(' '),\n email: formData.email || renewalState.data.subscription.customerEmail,\n phone: {\n countryCode: formData.countryCodePhoneNumber || '',\n number: formData.phoneNumber || '',\n },\n },\n billingDetails: {\n address: {\n lineOne: formData['billing-address'] || '',\n city: formData['billing-city'] || '',\n state: formData['billing-state'] || '',\n country: formData['billing-country'] || '',\n zipCode: formData['billing-zip'] || '',\n },\n identification: {\n type: formData.documentType || '',\n value: formData.documentNumber || '',\n },\n },\n }),\n };\n\n const idempotencyKey = generateIdempotencyKey();\n const response = await api.checkout.createCardCheckoutRequest(\n renewalState.data.id,\n idempotencyKey,\n renewalRequest,\n renewalState.token,\n );\n\n this.isSubmitting = false;\n this.isCardSubmitting = false;\n RenewalStore.setLoading(false);\n RenewalStore.setCheckoutResponse(response.data);\n\n if (response.data.result?.status.toUpperCase() === CheckoutStatusE.APPROVED) {\n this.isCardSuccess = true;\n } else {\n this.isCardSuccess = false;\n this.errorPaymentCard = true;\n this.errorMessage = {\n message: response.data.error?.error?.message as PaymentMessageE,\n };\n }\n } catch (error: any) {\n this.isSubmitting = false;\n this.isCardSubmitting = false;\n RenewalStore.setLoading(false);\n\n this.errorPaymentCard = true;\n this.errorMessage = {\n message: error.data?.error?.message as PaymentMessageE,\n };\n }\n }\n\n private async handleAPMRenewal(event?: CustomEvent) {\n this.isSubmitting = true;\n RenewalStore.setLoading(true);\n\n try {\n const apmPaymentMethod = PaymentMethodMapper.mapToAPMPaymentMethod(\n this.currentPaymentMethod,\n renewalState.data.price.country,\n );\n\n // Get form data for billing details and customer info\n const formData = event?.detail || this.getFormData();\n\n // Transform form data to match CreateAPMCheckoutRequest structure\n const billingDetails = {\n address: {\n country: formData['billing-country'],\n state: formData['billing-state'] || '',\n city: formData['billing-city'] || '',\n zipCode: formData['billing-zip'] || '',\n lineOne: formData['billing-address'] || '',\n },\n identification: {\n type: formData.documentType || 'dni',\n value: formData.documentNumber || '',\n },\n };\n\n const renewalRequest: CreateAPMCheckoutRequest = {\n transaction: {\n quantity: 1,\n },\n method: apmPaymentMethod,\n billingDetails,\n redirect: {\n approved: window.location.origin + '/renewal/success',\n rejected: window.location.origin + '/renewal/failure',\n },\n paymentMetadata: {\n orderId: renewalState.data.id,\n source: 'renewal-web',\n },\n customAttributes: {\n bank: formData.bankId || '',\n },\n };\n\n // Add customer data for renewal\n renewalRequest.customer = {\n firstName:\n formData.fullName?.split(' ')[0] ||\n renewalState.data.subscription.customerName.split(' ')[0] ||\n '',\n lastName:\n formData.fullName?.split(' ').slice(1).join(' ') ||\n renewalState.data.subscription.customerName.split(' ').slice(1).join(' ') ||\n '',\n email: formData.email || renewalState.data.subscription.customerEmail,\n phone: {\n countryCode: formData.countryCodePhoneNumber || '',\n number: formData.phoneNumber || '',\n },\n };\n\n const idempotencyKey = generateIdempotencyKey();\n const response = await api.checkout.createAPMCheckoutRequest(\n renewalState.data.id,\n idempotencyKey,\n renewalRequest,\n );\n\n this.isSubmitting = false;\n RenewalStore.setLoading(false);\n RenewalStore.setCheckoutResponse(response.data);\n this.checkoutResponse = response.data;\n const status = response.data.result?.status?.toString().toLowerCase();\n const isApproved = status === CheckoutStatusE.APPROVED.toLowerCase();\n const isPendingCustomerCharge = status === STATUS_REQ_CHECKOUT_APM.PENDING_CUSTOMER_CHARGE;\n\n if (isApproved) {\n this.isCardSuccess = true;\n this.errorPaymentAPM = false;\n this.errorMessage = null;\n } else if (isPendingCustomerCharge) {\n // Keep showing the QR/URL without showing an error for pending Pix payments\n this.isCardSuccess = false;\n this.errorPaymentAPM = false;\n this.errorMessage = null;\n } else {\n this.paymentError.emit(response.data);\n RenewalStore.setCheckoutResponse(response.data);\n this.errorPaymentAPM = true;\n\n this.errorMessage = {\n alertTitle: response.data?.error?.message as PaymentMessageE,\n message: response.data.error?.message as PaymentMessageE,\n };\n }\n } catch (error: any) {\n this.isSubmitting = false;\n RenewalStore.setLoading(false);\n this.paymentError.emit(error);\n this.errorPaymentAPM = true;\n\n this.errorMessage = {\n alertTitle: error.data?.error?.message as PaymentMessageE,\n message: error.data?.error?.message,\n };\n }\n }\n\n private getFormData = () => {\n return this.initialData;\n };\n\n private getInitialData = () => {\n return {\n 'email': renewalState.data.subscription.customerEmail,\n 'fullName': renewalState.data.subscription.customerName,\n 'card': '',\n 'billing-country': '',\n 'billing-state': '',\n 'billing-address': '',\n 'billing-city': '',\n 'billing-zip': '',\n 'bankId': '',\n 'phoneNumber': '',\n 'countryCodePhoneNumber': '',\n 'documentType': '',\n 'documentNumber': '',\n };\n };\n\n private hasPrefilledAddress = () => {\n const billingFields = [\n 'billing-country',\n 'billing-state',\n 'billing-address',\n 'billing-city',\n 'billing-zip',\n ];\n return billingFields.some(key => {\n const value = this.initialData[key];\n return value && value.trim() !== '';\n });\n };\n\n private getPaymentDate = (): string => {\n const payment = renewalState.form.checkoutResponse;\n if (!payment) return '';\n\n if ('date' in payment) {\n return payment.date as string;\n }\n\n return '';\n };\n\n private getReferenceNumber = (): string => {\n const payment = renewalState.form.checkoutResponse;\n if (!payment) return '';\n if ('traceId' in payment) {\n return payment.traceId as string;\n }\n\n return '';\n };\n\n private get isAPMCheckoutVisible(): boolean {\n return (\n !this.isCardSuccess &&\n !this.errorPaymentAPM &&\n !!this.checkoutResponse?.result &&\n (this.currentPaymentMethod === PAYMENT_METHOD_ENUM.CASH ||\n this.currentPaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER)\n );\n }\n\n /**\n * Listen for payment status changes emitted by the APM checkout component (polling).\n * Mirrors the behavior in the main checkout flow so Pix/transfer renewals update when approved/rejected.\n */\n private handlePaymentStatusChange = (statusData: {\n status: STATUS_REQ_CHECKOUT_APM;\n isCompleted: boolean;\n data: any;\n }) => {\n if (statusData.isCompleted) {\n if (statusData.status === STATUS_REQ_CHECKOUT_APM.APPROVED) {\n this.isCardSuccess = true;\n this.errorPaymentAPM = false;\n this.errorMessage = null;\n this.success.emit({\n paymentMethod: this.currentPaymentMethod,\n data: this.checkoutResponse,\n });\n } else if (statusData.status === STATUS_REQ_CHECKOUT_APM.REJECTED) {\n this.errorPaymentAPM = true;\n this.errorMessage = {\n alertTitle: PaymentMessageE.APM_ERROR_GENERIC,\n message: PaymentMessageE.APM_MESSAGE_ERROR,\n };\n }\n }\n };\n\n render() {\n if (!renewalState.isInitialized) {\n return <div class=\"loading\">{I18nService.translate('renewal.loading')}</div>;\n }\n\n const renderRenewalSummary = props => (\n <renewal-summary\n totalAmount={renewalState.data.price.amount}\n subTotalAmount={renewalState.data.subscription.subTotalAmount}\n currency={renewalState.data.price.currency}\n subscriptionTitle={renewalState.data.subscription.name[0]?.text || 'Subscription'}\n subscriptionAmount={renewalState.data.subscription.amount}\n nextChargeDate={renewalState.data.subscription.nextChargeDate}\n frequency={renewalState.data.subscription.frequency}\n couponCode={renewalState.data.price.couponCode}\n discountAmount={renewalState.data.price.discountedAmount}\n discountPercentage={renewalState.data.price.discountPercentage}\n {...props}\n />\n );\n\n return (\n <>\n <rebill-processing-payment style={{ display: this.isCardSubmitting ? 'block' : 'none' }} />\n {this.isCardSuccess ? (\n <renewal-success-page\n typePaymentMethod={this.currentPaymentMethod}\n paymentDate={this.getPaymentDate()}\n referenceNumber={this.getReferenceNumber()}\n cardLastFour={renewalState.data.subscription.cardLastFour}\n country={renewalState.data.price.country}\n paymentMethodName={PaymentMethodMapper.mapToAPMPaymentMethod(\n this.currentPaymentMethod,\n renewalState.data?.price?.country,\n )}\n bank={renewalState.form?.selectedBankId || ''}\n />\n ) : (\n <rebill-checkout-form\n style={{ display: this.isCardSubmitting || this.isCardSuccess ? 'none' : 'block' }}\n validationSchema={this.validationSchema}\n initialData={this.initialData}\n onSubmit={(args: any) => this.handleSubmit(args)}\n renderForm={({ submit, formData, errors }) => (\n <div class=\"rebill-checkout-renewal\">\n <div class=\"left-section\">\n <div class=\"left-section-container\">\n <organization-logo organization={renewalState.data.organization} />\n\n <div class=\"checkout-form-section\">\n {/* Customer Information - Readonly */}\n <user-information-static\n userInfo={{\n customerName: renewalState.data.subscription.customerName,\n customerEmail: renewalState.data.subscription.customerEmail,\n }}\n />\n\n {isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) &&\n renderRenewalSummary({\n displayedComponents: 'header',\n })}\n\n {isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) &&\n renderRenewalSummary({\n displayedComponents: 'details',\n })}\n\n {/* Payment Method Selection */}\n <div style={{ display: 'flex', flexDirection: 'column', gap: '32px' }}>\n <payment-method-selector\n enabledPaymentMethods={[\n ...new Set(\n renewalState.data.paymentMethods.map(\n pm => pm.type as PAYMENT_METHOD_ENUM,\n ),\n ),\n ]}\n defaultSelected={this.currentPaymentMethod}\n errorComponent={{\n showErrorComponent: this.currentPaymentError,\n alertTitle: PaymentErrorMapper.getErrorTitle(\n this.currentPaymentMethod,\n renewalState.data.price.country,\n this.errorMessage?.alertTitle,\n ),\n message: PaymentErrorMapper.getErrorMessage(\n this.errorMessage?.message,\n this.currentPaymentMethod,\n renewalState.data.price.country,\n ),\n }}\n cardError={{\n showCardInvalid: this.errorCardInvalid,\n type: null,\n }}\n country={renewalState.data.price.country}\n documentTypeError={errors?.documentType}\n documentNumberError={errors?.documentNumber}\n showDocument={\n !this.isAPMCheckoutVisible &&\n this.cardMode === 'input' &&\n (isFieldRequired('documentType', this.currentRequiredFields) ||\n isFieldRequired('documentNumber', this.currentRequiredFields))\n }\n />\n {/* Alert for non-card payment methods */}\n {this.currentPaymentMethod !== PAYMENT_METHOD_ENUM.CARD &&\n renewalState.data.subscription?.paymentMethod ===\n PAYMENT_METHOD_ENUM.CARD && (\n <rebill-alert\n type=\"info\"\n message={I18nService.translate('renewal.paymentMethodAlert', {\n cardLastFour:\n renewalState.data?.subscription?.cardLastFour || '****',\n })}\n icon=\"calendar-edit\"\n variant=\"outlined\"\n colorIcon={COLORS_ENUM.PRIMARY}\n />\n )}\n {!this.isAPMCheckoutVisible &&\n this.cardMode === 'input' &&\n isFieldRequired('bankId', this.currentRequiredFields) && (\n <div class=\"animated-component fade-in\">\n <rebill-bank-selector\n banks={\n getFieldValues(\n 'bank',\n this.allRequiredFields[this.currentPaymentMethod]?.original,\n ) || []\n }\n defaultSelectedBankId={formData.bankId || ''}\n error={errors?.bankId}\n />\n </div>\n )}\n </div>\n {!this.isAPMCheckoutVisible &&\n this.cardMode === 'input' &&\n (isFieldRequired('billing-country', this.currentRequiredFields) ||\n isFieldRequired('billing-state', this.currentRequiredFields) ||\n isFieldRequired('billing-address', this.currentRequiredFields) ||\n isFieldRequired('billing-city', this.currentRequiredFields) ||\n isFieldRequired('billing-zip', this.currentRequiredFields)) && (\n <div class=\"animated-component slide-in\">\n <rebill-address\n countryOptions={this.countries.map(country => ({\n label: country.country,\n value: country.isoCountryCode,\n }))}\n billingView={this.hasPrefilledAddress() ? 'form' : 'search'}\n errors={{\n 'billing-country': errors['billing-country'],\n 'billing-state': errors['billing-state'],\n 'billing-address': errors['billing-address'],\n 'billing-city': errors['billing-city'],\n 'billing-zip': errors['billing-zip'],\n }}\n />\n </div>\n )}\n {!this.isAPMCheckoutVisible &&\n this.cardMode === 'input' &&\n isFieldRequired('phoneNumber', this.currentRequiredFields) && (\n <div class=\"animated-component fade-in\">\n <user-information-phone error={errors?.phoneNumber} />\n </div>\n )}\n\n {/* Show APM checkout response after successful payment submission */}\n {this.isAPMCheckoutVisible && (\n <apm-checkout\n paymentMethod={this.currentPaymentMethod}\n referenceId={\n this.currentPaymentMethod === PAYMENT_METHOD_ENUM.CASH\n ? this.checkoutResponse.result.data.referenceId\n : undefined\n }\n qrCodeData={\n this.currentPaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER\n ? this.checkoutResponse.result.data.qrCode\n : undefined\n }\n code={this.checkoutResponse?.result?.data?.code}\n providerName={renewalState.data.organization?.name || ''}\n expirationDate={(() => {\n const expirationDate = new Date();\n expirationDate.setDate(expirationDate.getDate() + 30);\n return expirationDate.toISOString();\n })()}\n country={renewalState.data.price.country}\n redirectUrl={this.checkoutResponse.result.data.url}\n checkoutRequestId={this.checkoutResponse?.result?.checkoutRequestId}\n bearerToken={this.checkoutResponse?.result?.data?.bearerToken}\n onPaymentStatusChange={event =>\n this.handlePaymentStatusChange(event.detail)\n }\n />\n )}\n\n {isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) &&\n renderRenewalSummary({\n displayedComponents: 'summary',\n })}\n\n <div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>\n {/* Payment Button */}\n {!this.isAPMCheckoutVisible && (\n <payment-button\n paymentMethod={this.currentPaymentMethod}\n isLoading={this.isSubmitting}\n isRenewal={true}\n trialPeriodDays={renewalState.data.subscription.trialPeriodDays}\n redirectUrl={!!this.checkoutResponse?.result?.data?.url}\n timeToRedirect={5000}\n country={renewalState.data.price.country}\n isDisabled={renewalState.fetchingInstallments}\n onSubmit={() => submit()}\n />\n )}\n\n {/* Disabled Button Below */}\n <rebill-alert\n type=\"secure\"\n variant=\"variant-secure\"\n icon=\"lock-outline\"\n message={I18nService.translate('otp.secureMessage')}\n />\n </div>\n </div>\n <rebill-footer\n style={{\n marginTop: isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP)\n ? '24px'\n : 'auto',\n }}\n />\n </div>\n </div>\n\n {/* Desktop Summary */}\n {!isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) && (\n <div class=\"right-section\">\n <div class=\"checkout-summary-section\">\n {renderRenewalSummary({\n displayedComponents: ['header', 'details', 'summary'],\n })}\n </div>\n </div>\n )}\n </div>\n )}\n />\n )}\n </>\n );\n }\n}\n"],"names":["PAYMENT_METHOD_ENUM","BREAKPOINT_ENUM","yup.string","isFieldRequired","renewalState","getBreakpoint","RenewalStore","GoogleMapsService","api","getAllRequiredFieldsRenewal","getRequiredFieldsForMethod","renewalOnChange","generateIdempotencyKey","CheckoutStatusE","PaymentMethodMapper","STATUS_REQ_CHECKOUT_APM","PaymentMessageE","h","I18nService","isBreakpointBelow","PaymentErrorMapper","COLORS_ENUM","getFieldValues"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,yuJAAyuJ;;MCqCrvJ,aAAa,GAAA,MAAA;;;;;;;AAChB,IAAA,WAAW;AACX,IAAA,YAAY;AAEX,IAAA,oBAAoB,GAAwBA,gCAAmB,CAAC,IAAI;IACpE,YAAY,GAAY,KAAK;IAC7B,gBAAgB,GAAY,KAAK;IACjC,aAAa,GAAY,KAAK;IAC9B,YAAY,GAA0B,IAAI;AAC1C,IAAA,UAAU,GAAoBC,0BAAe,CAAC,OAAO;IACrD,gBAAgB,GAAY,KAAK;IACjC,eAAe,GAAY,KAAK;IAChC,WAAW,GAAQ,EAAE;IACrB,gBAAgB,GAAqC,IAAI;IACzD,uBAAuB,GAA8B,IAAI;IACzD,SAAS,GAAc,EAAE;IACzB,iBAAiB,GAAyB,EAAE;IAC5C,qBAAqB,GAAa,EAAE;IACpC,gBAAgB,GAAY,KAAK;IACjC,QAAQ,GAA8B,QAAQ;AAE9C,IAAA,OAAO;AACP,IAAA,YAAY;AACZ,IAAA,qBAAqB;AAEtB,IAAA,gBAAgB,GAAG;QACzB,aAAa,EAAEC,kB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ACD,CAAA,CACH,CACA;;;;;;;"}
1
+ {"version":3,"file":"rebill-renewal.entry.cjs.js","sources":["src/components/renewal/rebill-renewal.css?tag=rebill-renewal","src/components/renewal/rebill-renewal.tsx"],"sourcesContent":["@import '../../styles/variables.css';\n\n@media (max-width: 1024px) {\n .rebill-checkout-renewal {\n flex-direction: column;\n gap: 0;\n justify-content: flex-start;\n background: var(--rebill-color-background);\n padding: 20px;\n }\n .right-section .left-section {\n width: 100%;\n height: 100%;\n background: var(--rebill-color-background);\n }\n .checkout-form-section {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n gap: 24px;\n height: 100%;\n margin-top: 24px;\n }\n .otp-container {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n gap: 24px;\n }\n}\n\n@media (min-width: 1025px) {\n .rebill-checkout-renewal {\n width: 100vw;\n min-height: 100vh;\n display: flex;\n flex-direction: row;\n justify-content: center;\n overflow-y: auto;\n }\n\n .left-section {\n display: flex;\n width: 60%;\n background: var(--rebill-color-background-left);\n justify-content: space-around;\n }\n\n .right-section {\n display: flex;\n padding-top: 72px;\n width: 40%;\n background: var(--rebill-color-background-right);\n position: sticky;\n top: 0;\n\n justify-content: center;\n }\n\n .checkout-form-section {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n margin-bottom: 36px;\n margin-top: 24px;\n gap: 32px;\n }\n .left-section-container {\n max-width: 450px;\n min-width: 450px;\n margin: 2.5rem 2rem 1.5rem 2rem;\n display: flex;\n flex-direction: column;\n }\n\n .checkout-summary-section {\n max-width: 450px;\n min-width: 350px;\n margin: 0rem 2rem;\n background: var(--rebill-color-background-right);\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n width: 100%;\n }\n\n .checkout-form-section user-information,\n .checkout-form-section payment-method-selector,\n .checkout-form-section rebill-address,\n .checkout-summary-section rebill-summary {\n width: 100%;\n }\n\n /* Google Maps Autocomplete Styles */\n .pac-container {\n border-radius: 4px;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);\n border: 1px solid #e0e0e0;\n margin-top: 4px;\n font-family: inherit;\n }\n\n .pac-item {\n padding: 10px 12px;\n cursor: pointer;\n border-top: none;\n }\n\n .pac-item:first-child {\n border-top: none;\n }\n\n .pac-item:hover {\n background-color: #f5f5f5;\n }\n\n .pac-item-query {\n font-weight: 500;\n }\n\n .pac-icon {\n display: none;\n }\n}\n\n.payment-button-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-bottom: 16px;\n}\n/* Animaciones para componentes condicionales */\n.animated-component {\n transition: all 0.3s ease-in-out;\n overflow: visible;\n}\n\n/* Keep overflow hidden only for sliding height animations */\n/* .animated-component.slide-in {\n overflow: hidden;\n} */\n\n.fade-in {\n animation: fadeIn 0.4s ease-in-out;\n}\n\n.slide-in {\n animation: slideIn 0.5s ease-out;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n transform: translateY(-10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes slideIn {\n from {\n opacity: 0;\n transform: translateX(-20px);\n max-height: 0;\n }\n to {\n opacity: 1;\n transform: translateX(0);\n max-height: 450px;\n }\n}\n\n/* Animación para cuando se ocultan los componentes */\n.animated-component.hide {\n animation: fadeOut 0.3s ease-in-out forwards;\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(20px);\n }\n}\n\n/* Test Mode Chip Positioning */\nrebill-mode-sandbox {\n position: fixed;\n bottom: 50px;\n left: 50%;\n transform: translateX(-50%);\n z-index: 1000;\n}\n\n/* Ensure the chip is visible on all screen sizes */\n@media (max-width: 1024px) {\n rebill-test-mode-chip {\n bottom: 46px;\n }\n}\n\n@media (min-width: 1025px) {\n rebill-test-mode-chip {\n bottom: 46px;\n }\n}\n.mode-sandbox-mobile-container {\n display: flex;\n align-items: center;\n width: 100%;\n\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n/* Desktop grande - mantener tamaños originales */\n@media (min-width: 1451px) {\n .left-section-container {\n min-width: 450px;\n margin: 2.5rem 5rem 1.5rem 5rem;\n }\n\n .checkout-summary-section {\n min-width: 450px;\n margin: 0rem 5rem;\n }\n}\n","import { Component, Event, EventEmitter, h, Listen, Prop, State } from '@stencil/core';\nimport * as yup from 'yup';\nimport { api, Country } from '../../api';\nimport { SavedCard } from '../../api/entities/cards/types';\nimport {\n CheckoutStatusE,\n CreateAPMCheckoutRequest,\n CreateAPMCheckoutResponse,\n CreateCardCheckoutRequest,\n} from '../../api/entities/checkout/types';\nimport '../../components/checkout/apm/apm-checkout/apm-checkout';\nimport '../../components/checkout/processing-payment/processing-payment';\nimport { I18nService } from '../../i18n/i18n.service';\n\nimport { PaymentMethodNameE } from '../../models/enums/payment-method-name.enum';\nimport { PAYMENT_METHOD_ENUM } from '../../models/enums/payment-methods.enum';\nimport { PaymentMessageE } from '../../models/enums/payment-status.enum';\nimport { STATUS_REQ_CHECKOUT_APM } from '../../models/enums/status-req-checkout-apm.enum';\nimport { onChange as renewalOnChange, renewalState, RenewalStore } from '../../store/renewal.store';\nimport { BREAKPOINT_ENUM, getBreakpoint, isBreakpointBelow } from '../../utils/breakpoint';\nimport { COLORS_ENUM } from '../../utils/color-class-mapper';\nimport { generateIdempotencyKey } from '../../utils/generate-idempotency-key';\nimport { GoogleMapsService } from '../../utils/google-maps.service';\nimport { AlertErrorKeys, PaymentErrorMapper } from '../../utils/payment-error-mapper';\nimport { PaymentMethodMapper } from '../../utils/payment-method-mapper';\nimport { getFieldValues, isFieldRequired } from '../../utils/required-fields-mappers';\nimport {\n AllRequiredFieldsMap,\n getAllRequiredFieldsRenewal,\n getRequiredFieldsForMethod,\n} from './utils/getRequiredFieldsRenewal';\n\n@Component({\n tag: 'rebill-renewal',\n styleUrl: 'rebill-renewal.css',\n shadow: false,\n})\nexport class RebillRenewal {\n @Prop() renewalData!: string;\n @Prop() renewalToken!: string;\n\n @State() currentPaymentMethod: PAYMENT_METHOD_ENUM = PAYMENT_METHOD_ENUM.CARD;\n @State() isSubmitting: boolean = false;\n @State() isCardSubmitting: boolean = false;\n @State() isCardSuccess: boolean = false;\n @State() errorMessage: AlertErrorKeys | null = null;\n @State() breakpoint: BREAKPOINT_ENUM = BREAKPOINT_ENUM.DESKTOP;\n @State() errorPaymentCard: boolean = false;\n @State() errorPaymentAPM: boolean = false;\n @State() initialData: any = {};\n @State() checkoutResponse: CreateAPMCheckoutResponse | null = null;\n @State() currentApmPaymentMethod: PaymentMethodNameE | null = null;\n @State() countries: Country[] = [];\n @State() allRequiredFields: AllRequiredFieldsMap = {};\n @State() currentRequiredFields: string[] = [];\n @State() errorCardInvalid: boolean = false;\n @State() cardMode: 'input' | 'select' | null = 'select';\n\n @Event() success: EventEmitter<any>;\n @Event() paymentError: EventEmitter<any>;\n @Event() paymentMethodSelected: EventEmitter<PAYMENT_METHOD_ENUM>;\n\n private validationSchema = {\n 'phoneNumber': yup.string().when([], {\n is: () =>\n isFieldRequired('phoneNumber', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.phoneRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-country': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-country', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.countryRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-state': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-state', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.stateRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-address': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-address', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.addressRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-city': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-city', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.cityRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-zip': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-zip', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.zipRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'bankId': yup.string().when([], {\n is: () => isFieldRequired('bankId', this.currentRequiredFields),\n then: schema => schema.required('validation.bankRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'documentType': yup.string().when([], {\n is: () =>\n isFieldRequired('documentType', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.documentTypeRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'documentNumber': yup.string().when([], {\n is: () =>\n isFieldRequired('documentNumber', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => {\n const baseSchema = schema.required('validation.documentNumberRequired').min(7, 'validation.documentInvalid');\n\n // For BR checkout, validate that document number contains only digits\n if (renewalState.data?.price?.country === 'BR') {\n return baseSchema.test(\n 'numeric-only',\n 'validation.documentNumberNumericOnly',\n value => {\n if (!value) return true; // Let required validation handle empty values\n return /^\\d+$/.test(value);\n }\n );\n }\n\n return baseSchema;\n },\n otherwise: schema => schema.notRequired(),\n }),\n };\n\n private resizeHandler = () => {\n this.breakpoint = getBreakpoint(window.innerWidth);\n };\n\n async componentWillLoad() {\n this.resizeHandler();\n window.addEventListener('resize', this.resizeHandler);\n\n const renewalProps =\n typeof this.renewalData === 'string' ? JSON.parse(this.renewalData) : this.renewalData;\n\n RenewalStore.initializeRenewal({\n ...renewalProps,\n token: this.renewalToken,\n });\n\n // Load Google Maps script for address autocomplete\n GoogleMapsService.loadGoogleMapsScript();\n\n // Load countries data\n try {\n const response = await api.data.getCountries();\n this.countries = response.data;\n } catch (error) {\n console.error('Error loading countries:', error);\n }\n\n // Load required fields data\n try {\n this.allRequiredFields = await getAllRequiredFieldsRenewal();\n } catch (error) {\n console.error('Error loading required fields:', error);\n }\n\n if (renewalState.data.paymentMethods.length > 0) {\n let defaultPaymentMethod: PAYMENT_METHOD_ENUM | null = null;\n\n if (renewalState.data.subscription?.paymentMethod) {\n const subscriptionPaymentMethod =\n renewalState.data.subscription.paymentMethod.toLowerCase();\n const mappedMethod =\n subscriptionPaymentMethod === 'card'\n ? PAYMENT_METHOD_ENUM.CARD\n : subscriptionPaymentMethod === 'bank_transfer'\n ? PAYMENT_METHOD_ENUM.BANK_TRANSFER\n : null;\n\n if (mappedMethod) {\n const isAvailable = renewalState.data.paymentMethods.some(pm => pm.type === mappedMethod);\n if (isAvailable) {\n defaultPaymentMethod = mappedMethod;\n }\n }\n }\n\n if (!defaultPaymentMethod) {\n defaultPaymentMethod = renewalState.data.paymentMethods[0].type as PAYMENT_METHOD_ENUM;\n }\n\n this.currentPaymentMethod = defaultPaymentMethod;\n RenewalStore.setSelectedPaymentMethod(defaultPaymentMethod);\n\n if (defaultPaymentMethod !== PAYMENT_METHOD_ENUM.CARD) {\n this.cardMode = 'input';\n RenewalStore.setCardMode('input');\n }\n\n try {\n this.currentRequiredFields = getRequiredFieldsForMethod(\n defaultPaymentMethod,\n this.allRequiredFields,\n ).fields;\n } catch (error) {\n console.error('Error getting required fields for method:', error);\n }\n\n await this.initializeFingerprint(defaultPaymentMethod);\n }\n\n this.initialData = this.getInitialData();\n\n renewalOnChange('cardMode', () => {\n this.cardMode = renewalState.cardMode;\n });\n }\n\n disconnectedCallback() {\n window.removeEventListener('resize', this.resizeHandler);\n }\n\n @Listen('paymentMethodSelected')\n async handlePaymentMethodSelected(event: CustomEvent<PAYMENT_METHOD_ENUM>) {\n event.stopPropagation();\n\n if (this.currentPaymentMethod === event.detail) {\n return;\n }\n\n this.currentPaymentMethod = event.detail;\n RenewalStore.setSelectedPaymentMethod(this.currentPaymentMethod);\n\n // Change cardMode to 'input' if payment method is not CARD\n if (this.currentPaymentMethod !== PAYMENT_METHOD_ENUM.CARD) {\n this.cardMode = 'input';\n RenewalStore.setCardMode('input');\n }\n\n // Update required fields for the new payment method\n try {\n this.currentRequiredFields = getRequiredFieldsForMethod(\n this.currentPaymentMethod,\n this.allRequiredFields,\n ).fields;\n } catch (error) {\n console.error('Error getting required fields for method:', error);\n }\n\n // Note: Fingerprint is handled in componentWillLoad\n\n // Initialize fingerprint for the new payment method\n await this.initializeFingerprint(this.currentPaymentMethod);\n\n this.paymentMethodSelected.emit(event.detail);\n }\n\n private async initializeFingerprint(paymentMethod: PAYMENT_METHOD_ENUM) {\n // Only initialize fingerprint for card payments and if not already generated\n if (paymentMethod === PAYMENT_METHOD_ENUM.CARD && !renewalState.deviceId) {\n try {\n const uuid = crypto.randomUUID();\n const fingerprintResponse = await api.fingerPrint.getFingerPrint(uuid);\n RenewalStore.setDeviceId(uuid);\n const script = fingerprintResponse.result.script;\n const scriptElement = document.createElement('script');\n scriptElement.innerHTML = script;\n document.body.appendChild(scriptElement);\n } catch (error) {\n console.error('Failed to initialize fingerprint:', error);\n }\n }\n }\n\n @Listen('bankSelected')\n handleBankSelected(event: CustomEvent<string>) {\n event.stopPropagation();\n RenewalStore.setSelectedBankId(event.detail);\n }\n\n @Listen('cardSelected')\n handleCardSelected(event: CustomEvent<{ card: SavedCard; cvv?: string }>) {\n const { card, cvv } = event.detail;\n RenewalStore.setSelectedCard(card);\n RenewalStore.setCvv(cvv || '');\n }\n\n private get currentPaymentError(): boolean {\n if (this.currentPaymentMethod === PAYMENT_METHOD_ENUM.CARD) {\n return this.errorPaymentCard;\n } else if (\n this.currentPaymentMethod === PAYMENT_METHOD_ENUM.CASH ||\n this.currentPaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER\n ) {\n return this.errorPaymentAPM;\n }\n return false;\n }\n\n private async handleSubmit(event?: CustomEvent) {\n if (this.isSubmitting) {\n return;\n }\n\n if (this.currentPaymentMethod === PAYMENT_METHOD_ENUM.CARD) {\n await this.handleCardRenewal(event);\n } else {\n await this.handleAPMRenewal(event);\n }\n }\n\n private async handleCardRenewal(event?: CustomEvent) {\n const formData = event?.detail || this.getInitialData();\n\n if (!renewalState.data.cardId && !renewalState.data.cardTokenId) {\n this.errorCardInvalid = true;\n return;\n }\n if (!renewalState.data.cardInformation && !renewalState.data.cardId) {\n this.errorCardInvalid = true;\n return;\n }\n this.errorCardInvalid = false;\n this.isSubmitting = true;\n this.isCardSubmitting = true;\n RenewalStore.setLoading(true);\n\n try {\n const renewalRequest: CreateCardCheckoutRequest = {\n transaction: {\n quantity: 1,\n },\n ...(renewalState.data.cardId && { cardId: renewalState.data.cardId }),\n ...(renewalState.data.cardTokenId && { cardTokenId: renewalState.data.cardTokenId }),\n customAttributes: {\n ...(renewalState.deviceId && { deviceId: renewalState.deviceId }),\n },\n ...(this.cardMode === 'input' && {\n customer: {\n firstName:\n formData.fullName?.split(' ')[0] ||\n renewalState.data.subscription.customerName?.split(' ')[0],\n lastName:\n formData.fullName?.split(' ').slice(1).join(' ') ||\n renewalState.data.subscription.customerName?.split(' ').slice(1).join(' '),\n email: formData.email || renewalState.data.subscription.customerEmail,\n phone: {\n countryCode: formData.countryCodePhoneNumber || '',\n number: formData.phoneNumber || '',\n },\n },\n billingDetails: {\n address: {\n lineOne: formData['billing-address'] || '',\n city: formData['billing-city'] || '',\n state: formData['billing-state'] || '',\n country: formData['billing-country'] || '',\n zipCode: formData['billing-zip'] || '',\n },\n identification: {\n type: formData.documentType || '',\n value: formData.documentNumber || '',\n },\n },\n }),\n };\n\n const idempotencyKey = generateIdempotencyKey();\n const response = await api.checkout.createCardCheckoutRequest(\n renewalState.data.id,\n idempotencyKey,\n renewalRequest,\n renewalState.token,\n );\n\n this.isSubmitting = false;\n this.isCardSubmitting = false;\n RenewalStore.setLoading(false);\n RenewalStore.setCheckoutResponse(response.data);\n\n if (response.data.result?.status.toUpperCase() === CheckoutStatusE.APPROVED) {\n this.isCardSuccess = true;\n } else {\n this.isCardSuccess = false;\n this.errorPaymentCard = true;\n this.errorMessage = {\n message: response.data.error?.error?.message as PaymentMessageE,\n };\n }\n } catch (error: any) {\n this.isSubmitting = false;\n this.isCardSubmitting = false;\n RenewalStore.setLoading(false);\n\n this.errorPaymentCard = true;\n this.errorMessage = {\n message: error.data?.error?.message as PaymentMessageE,\n };\n }\n }\n\n private async handleAPMRenewal(event?: CustomEvent) {\n this.isSubmitting = true;\n RenewalStore.setLoading(true);\n\n try {\n const apmPaymentMethod = PaymentMethodMapper.mapToAPMPaymentMethod(\n this.currentPaymentMethod,\n renewalState.data.price.country,\n );\n\n // Get form data for billing details and customer info\n const formData = event?.detail || this.getFormData();\n\n // Transform form data to match CreateAPMCheckoutRequest structure\n const billingDetails = {\n address: {\n country: formData['billing-country'],\n state: formData['billing-state'] || '',\n city: formData['billing-city'] || '',\n zipCode: formData['billing-zip'] || '',\n lineOne: formData['billing-address'] || '',\n },\n identification: {\n type: formData.documentType || 'dni',\n value: formData.documentNumber || '',\n },\n };\n\n const renewalRequest: CreateAPMCheckoutRequest = {\n transaction: {\n quantity: 1,\n },\n method: apmPaymentMethod,\n billingDetails,\n redirect: {\n approved: window.location.origin + '/renewal/success',\n rejected: window.location.origin + '/renewal/failure',\n },\n paymentMetadata: {\n orderId: renewalState.data.id,\n source: 'renewal-web',\n },\n customAttributes: {\n bank: formData.bankId || '',\n },\n };\n\n // Add customer data for renewal\n renewalRequest.customer = {\n firstName:\n formData.fullName?.split(' ')[0] ||\n renewalState.data.subscription.customerName.split(' ')[0] ||\n '',\n lastName:\n formData.fullName?.split(' ').slice(1).join(' ') ||\n renewalState.data.subscription.customerName.split(' ').slice(1).join(' ') ||\n '',\n email: formData.email || renewalState.data.subscription.customerEmail,\n phone: {\n countryCode: formData.countryCodePhoneNumber || '',\n number: formData.phoneNumber || '',\n },\n };\n\n const idempotencyKey = generateIdempotencyKey();\n const response = await api.checkout.createAPMCheckoutRequest(\n renewalState.data.id,\n idempotencyKey,\n renewalRequest,\n );\n\n this.isSubmitting = false;\n RenewalStore.setLoading(false);\n RenewalStore.setCheckoutResponse(response.data);\n this.checkoutResponse = response.data;\n const status = response.data.result?.status?.toString().toLowerCase();\n const isApproved = status === CheckoutStatusE.APPROVED.toLowerCase();\n const isPendingCustomerCharge = status === STATUS_REQ_CHECKOUT_APM.PENDING_CUSTOMER_CHARGE;\n\n if (isApproved) {\n this.isCardSuccess = true;\n this.errorPaymentAPM = false;\n this.errorMessage = null;\n } else if (isPendingCustomerCharge) {\n // Keep showing the QR/URL without showing an error for pending Pix payments\n this.isCardSuccess = false;\n this.errorPaymentAPM = false;\n this.errorMessage = null;\n } else {\n this.paymentError.emit(response.data);\n RenewalStore.setCheckoutResponse(response.data);\n this.errorPaymentAPM = true;\n\n this.errorMessage = {\n alertTitle: response.data?.error?.message as PaymentMessageE,\n message: response.data.error?.message as PaymentMessageE,\n };\n }\n } catch (error: any) {\n this.isSubmitting = false;\n RenewalStore.setLoading(false);\n this.paymentError.emit(error);\n this.errorPaymentAPM = true;\n\n this.errorMessage = {\n alertTitle: error.data?.error?.message as PaymentMessageE,\n message: error.data?.error?.message,\n };\n }\n }\n\n private getFormData = () => {\n return this.initialData;\n };\n\n private getInitialData = () => {\n return {\n 'email': renewalState.data.subscription.customerEmail,\n 'fullName': renewalState.data.subscription.customerName,\n 'card': '',\n 'billing-country': '',\n 'billing-state': '',\n 'billing-address': '',\n 'billing-city': '',\n 'billing-zip': '',\n 'bankId': '',\n 'phoneNumber': '',\n 'countryCodePhoneNumber': '',\n 'documentType': '',\n 'documentNumber': '',\n };\n };\n\n private hasPrefilledAddress = () => {\n const billingFields = [\n 'billing-country',\n 'billing-state',\n 'billing-address',\n 'billing-city',\n 'billing-zip',\n ];\n return billingFields.some(key => {\n const value = this.initialData[key];\n return value && value.trim() !== '';\n });\n };\n\n private getPaymentDate = (): string => {\n const payment = renewalState.form.checkoutResponse;\n if (!payment) return '';\n\n if ('date' in payment) {\n return payment.date as string;\n }\n\n return '';\n };\n\n private getReferenceNumber = (): string => {\n const payment = renewalState.form.checkoutResponse;\n if (!payment) return '';\n if ('traceId' in payment) {\n return payment.traceId as string;\n }\n\n return '';\n };\n\n private get isAPMCheckoutVisible(): boolean {\n return (\n !this.isCardSuccess &&\n !this.errorPaymentAPM &&\n !!this.checkoutResponse?.result &&\n (this.currentPaymentMethod === PAYMENT_METHOD_ENUM.CASH ||\n this.currentPaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER)\n );\n }\n\n /**\n * Listen for payment status changes emitted by the APM checkout component (polling).\n * Mirrors the behavior in the main checkout flow so Pix/transfer renewals update when approved/rejected.\n */\n private handlePaymentStatusChange = (statusData: {\n status: STATUS_REQ_CHECKOUT_APM;\n isCompleted: boolean;\n data: any;\n }) => {\n if (statusData.isCompleted) {\n if (statusData.status === STATUS_REQ_CHECKOUT_APM.APPROVED) {\n this.isCardSuccess = true;\n this.errorPaymentAPM = false;\n this.errorMessage = null;\n this.success.emit({\n paymentMethod: this.currentPaymentMethod,\n data: this.checkoutResponse,\n });\n } else if (statusData.status === STATUS_REQ_CHECKOUT_APM.REJECTED) {\n this.errorPaymentAPM = true;\n this.errorMessage = {\n alertTitle: PaymentMessageE.APM_ERROR_GENERIC,\n message: PaymentMessageE.APM_MESSAGE_ERROR,\n };\n }\n }\n };\n\n render() {\n if (!renewalState.isInitialized) {\n return <div class=\"loading\">{I18nService.translate('renewal.loading')}</div>;\n }\n\n const renderRenewalSummary = props => (\n <renewal-summary\n totalAmount={renewalState.data.price.amount}\n subTotalAmount={renewalState.data.subscription.subTotalAmount}\n currency={renewalState.data.price.currency}\n subscriptionTitle={renewalState.data.subscription.name[0]?.text || 'Subscription'}\n subscriptionAmount={renewalState.data.subscription.amount}\n nextChargeDate={renewalState.data.subscription.nextChargeDate}\n frequency={renewalState.data.subscription.frequency}\n couponCode={renewalState.data.price.couponCode}\n discountAmount={renewalState.data.price.discountedAmount}\n discountPercentage={renewalState.data.price.discountPercentage}\n {...props}\n />\n );\n\n return (\n <>\n <rebill-processing-payment style={{ display: this.isCardSubmitting ? 'block' : 'none' }} />\n {this.isCardSuccess ? (\n <renewal-success-page\n typePaymentMethod={this.currentPaymentMethod}\n paymentDate={this.getPaymentDate()}\n referenceNumber={this.getReferenceNumber()}\n cardLastFour={renewalState.data.subscription.cardLastFour}\n country={renewalState.data.price.country}\n paymentMethodName={PaymentMethodMapper.mapToAPMPaymentMethod(\n this.currentPaymentMethod,\n renewalState.data?.price?.country,\n )}\n bank={renewalState.form?.selectedBankId || ''}\n />\n ) : (\n <rebill-checkout-form\n style={{ display: this.isCardSubmitting || this.isCardSuccess ? 'none' : 'block' }}\n validationSchema={this.validationSchema}\n initialData={this.initialData}\n onSubmit={(args: any) => this.handleSubmit(args)}\n renderForm={({ submit, formData, errors }) => (\n <div class=\"rebill-checkout-renewal\">\n <div class=\"left-section\">\n <div class=\"left-section-container\">\n <organization-logo organization={renewalState.data.organization} />\n\n <div class=\"checkout-form-section\">\n {/* Customer Information - Readonly */}\n <user-information-static\n userInfo={{\n customerName: renewalState.data.subscription.customerName,\n customerEmail: renewalState.data.subscription.customerEmail,\n }}\n />\n\n {isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) &&\n renderRenewalSummary({\n displayedComponents: 'header',\n })}\n\n {isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) &&\n renderRenewalSummary({\n displayedComponents: 'details',\n })}\n\n {/* Payment Method Selection */}\n <div style={{ display: 'flex', flexDirection: 'column', gap: '32px' }}>\n <payment-method-selector\n enabledPaymentMethods={[\n ...new Set(\n renewalState.data.paymentMethods.map(\n pm => pm.type as PAYMENT_METHOD_ENUM,\n ),\n ),\n ]}\n defaultSelected={this.currentPaymentMethod}\n errorComponent={{\n showErrorComponent: this.currentPaymentError,\n alertTitle: PaymentErrorMapper.getErrorTitle(\n this.currentPaymentMethod,\n renewalState.data.price.country,\n this.errorMessage?.alertTitle,\n ),\n message: PaymentErrorMapper.getErrorMessage(\n this.errorMessage?.message,\n this.currentPaymentMethod,\n renewalState.data.price.country,\n ),\n }}\n cardError={{\n showCardInvalid: this.errorCardInvalid,\n type: null,\n }}\n country={renewalState.data.price.country}\n documentTypeError={errors?.documentType}\n documentNumberError={errors?.documentNumber}\n showDocument={\n !this.isAPMCheckoutVisible &&\n this.cardMode === 'input' &&\n (isFieldRequired('documentType', this.currentRequiredFields) ||\n isFieldRequired('documentNumber', this.currentRequiredFields))\n }\n />\n {/* Alert for non-card payment methods */}\n {this.currentPaymentMethod !== PAYMENT_METHOD_ENUM.CARD &&\n renewalState.data.subscription?.paymentMethod ===\n PAYMENT_METHOD_ENUM.CARD && (\n <rebill-alert\n type=\"info\"\n message={I18nService.translate('renewal.paymentMethodAlert', {\n cardLastFour:\n renewalState.data?.subscription?.cardLastFour || '****',\n })}\n icon=\"calendar-edit\"\n variant=\"outlined\"\n colorIcon={COLORS_ENUM.PRIMARY}\n />\n )}\n {!this.isAPMCheckoutVisible &&\n this.cardMode === 'input' &&\n isFieldRequired('bankId', this.currentRequiredFields) && (\n <div class=\"animated-component fade-in\">\n <rebill-bank-selector\n banks={\n getFieldValues(\n 'bank',\n this.allRequiredFields[this.currentPaymentMethod]?.original,\n ) || []\n }\n defaultSelectedBankId={formData.bankId || ''}\n error={errors?.bankId}\n />\n </div>\n )}\n </div>\n {!this.isAPMCheckoutVisible &&\n this.cardMode === 'input' &&\n (isFieldRequired('billing-country', this.currentRequiredFields) ||\n isFieldRequired('billing-state', this.currentRequiredFields) ||\n isFieldRequired('billing-address', this.currentRequiredFields) ||\n isFieldRequired('billing-city', this.currentRequiredFields) ||\n isFieldRequired('billing-zip', this.currentRequiredFields)) && (\n <div class=\"animated-component slide-in\">\n <rebill-address\n countryOptions={this.countries.map(country => ({\n label: country.country,\n value: country.isoCountryCode,\n }))}\n billingView={this.hasPrefilledAddress() ? 'form' : 'search'}\n errors={{\n 'billing-country': errors['billing-country'],\n 'billing-state': errors['billing-state'],\n 'billing-address': errors['billing-address'],\n 'billing-city': errors['billing-city'],\n 'billing-zip': errors['billing-zip'],\n }}\n />\n </div>\n )}\n {!this.isAPMCheckoutVisible &&\n this.cardMode === 'input' &&\n isFieldRequired('phoneNumber', this.currentRequiredFields) && (\n <div class=\"animated-component fade-in\">\n <user-information-phone error={errors?.phoneNumber} />\n </div>\n )}\n\n {/* Show APM checkout response after successful payment submission */}\n {this.isAPMCheckoutVisible &&\n (() => {\n const isBoleto =\n this.currentPaymentMethod === PAYMENT_METHOD_ENUM.CASH &&\n renewalState.data?.price?.country === 'BR' &&\n this.checkoutResponse?.result?.data?.barcode;\n\n return (\n <apm-checkout\n paymentMethod={this.currentPaymentMethod}\n barcode={\n isBoleto\n ? this.checkoutResponse?.result?.data?.barcode\n : undefined\n }\n referenceId={\n this.currentPaymentMethod === PAYMENT_METHOD_ENUM.CASH && !isBoleto\n ? this.checkoutResponse?.result?.data?.referenceId\n : undefined\n }\n qrCodeData={\n this.currentPaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER\n ? this.checkoutResponse?.result?.data?.qrCode\n : undefined\n }\n code={this.checkoutResponse?.result?.data?.code}\n providerName={renewalState.data.organization?.name || ''}\n expirationDate={(() => {\n const expirationDate = new Date();\n expirationDate.setDate(expirationDate.getDate() + 30);\n return expirationDate.toISOString();\n })()}\n country={renewalState.data.price.country}\n redirectUrl={this.checkoutResponse?.result?.data?.url}\n checkoutRequestId={this.checkoutResponse?.result?.checkoutRequestId}\n bearerToken={this.checkoutResponse?.result?.data?.bearerToken}\n onPaymentStatusChange={event =>\n this.handlePaymentStatusChange(event.detail)\n }\n />\n );\n })()}\n\n {isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) &&\n renderRenewalSummary({\n displayedComponents: 'summary',\n })}\n\n <div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>\n {/* Payment Button */}\n {!this.isAPMCheckoutVisible && (\n <payment-button\n paymentMethod={this.currentPaymentMethod}\n isLoading={this.isSubmitting}\n isRenewal={true}\n trialPeriodDays={renewalState.data.subscription.trialPeriodDays}\n redirectUrl={!!this.checkoutResponse?.result?.data?.url}\n timeToRedirect={5000}\n country={renewalState.data.price.country}\n isDisabled={renewalState.fetchingInstallments}\n onSubmit={() => submit()}\n />\n )}\n\n {/* Disabled Button Below */}\n <rebill-alert\n type=\"secure\"\n variant=\"variant-secure\"\n icon=\"lock-outline\"\n message={I18nService.translate('otp.secureMessage')}\n />\n </div>\n </div>\n <rebill-footer\n style={{\n marginTop: isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP)\n ? '24px'\n : 'auto',\n }}\n />\n </div>\n </div>\n\n {/* Desktop Summary */}\n {!isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) && (\n <div class=\"right-section\">\n <div class=\"checkout-summary-section\">\n {renderRenewalSummary({\n displayedComponents: ['header', 'details', 'summary'],\n })}\n </div>\n </div>\n )}\n </div>\n )}\n />\n )}\n </>\n );\n }\n}\n"],"names":["PAYMENT_METHOD_ENUM","BREAKPOINT_ENUM","yup.string","isFieldRequired","renewalState","getBreakpoint","RenewalStore","GoogleMapsService","api","getAllRequiredFieldsRenewal","getRequiredFieldsForMethod","renewalOnChange","generateIdempotencyKey","CheckoutStatusE","PaymentMethodMapper","STATUS_REQ_CHECKOUT_APM","PaymentMessageE","h","I18nService","isBreakpointBelow","PaymentErrorMapper","COLORS_ENUM","getFieldValues"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,yuJAAyuJ;;MCqCrvJ,aAAa,GAAA,MAAA;;;;;;;AAChB,IAAA,WAAW;AACX,IAAA,YAAY;AAEX,IAAA,oBAAoB,GAAwBA,gCAAmB,CAAC,IAAI;IACpE,YAAY,GAAY,KAAK;IAC7B,gBAAgB,GAAY,KAAK;IACjC,aAAa,GAAY,KAAK;IAC9B,YAAY,GAA0B,IAAI;AAC1C,IAAA,UAAU,GAAoBC,0BAAe,CAAC,OAAO;IACrD,gBAAgB,GAAY,KAAK;IACjC,eAAe,GAAY,KAAK;IAChC,WAAW,GAAQ,EAAE;IACrB,gBAAgB,GAAqC,IAAI;IACzD,uBAAuB,GAA8B,IAAI;IACzD,SAAS,GAAc,EAAE;IACzB,iBAAiB,GAAyB,EAA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AC,SAAS,CAAC,mBAAmB,CAAC,EACnD,CAAA,CACE,CACF,EACND,OAAA,CAAA,eAAA,EAAA,EACE,KAAK,EAAE;oBACL,SAAS,EAAEE,4BAAiB,CAAC,IAAI,CAAC,UAAU,EAAElB,0BAAe,CAAC,OAAO;AACnE,0BAAE;AACF,0BAAE,MAAM;AACX,iBAAA,EAAA,CACD,CACE,CACF,EAGL,CAACkB,4BAAiB,CAAC,IAAI,CAAC,UAAU,EAAElB,0BAAe,CAAC,OAAO,CAAC,KAC3DgB,OAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,eAAe,EAAA,EACxBA,OAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,0BAA0B,EAAA,EAClC,oBAAoB,CAAC;AACpB,gBAAA,mBAAmB,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC;aACtD,CAAC,CACE,CACF,CACP,CACG,CACP,EACD,CAAA,CACH,CACA;;;;;;;"}
@@ -540,15 +540,23 @@ export class RebillRenewal {
540
540
  'billing-zip': errors['billing-zip'],
541
541
  } }))), !this.isAPMCheckoutVisible &&
542
542
  this.cardMode === 'input' &&
543
- isFieldRequired('phoneNumber', this.currentRequiredFields) && (h("div", { class: "animated-component fade-in" }, h("user-information-phone", { error: errors?.phoneNumber }))), this.isAPMCheckoutVisible && (h("apm-checkout", { paymentMethod: this.currentPaymentMethod, referenceId: this.currentPaymentMethod === PAYMENT_METHOD_ENUM.CASH
544
- ? this.checkoutResponse.result.data.referenceId
545
- : undefined, qrCodeData: this.currentPaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER
546
- ? this.checkoutResponse.result.data.qrCode
547
- : undefined, code: this.checkoutResponse?.result?.data?.code, providerName: renewalState.data.organization?.name || '', expirationDate: (() => {
548
- const expirationDate = new Date();
549
- expirationDate.setDate(expirationDate.getDate() + 30);
550
- return expirationDate.toISOString();
551
- })(), country: renewalState.data.price.country, redirectUrl: this.checkoutResponse.result.data.url, checkoutRequestId: this.checkoutResponse?.result?.checkoutRequestId, bearerToken: this.checkoutResponse?.result?.data?.bearerToken, onPaymentStatusChange: event => this.handlePaymentStatusChange(event.detail) })), isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) &&
543
+ isFieldRequired('phoneNumber', this.currentRequiredFields) && (h("div", { class: "animated-component fade-in" }, h("user-information-phone", { error: errors?.phoneNumber }))), this.isAPMCheckoutVisible &&
544
+ (() => {
545
+ const isBoleto = this.currentPaymentMethod === PAYMENT_METHOD_ENUM.CASH &&
546
+ renewalState.data?.price?.country === 'BR' &&
547
+ this.checkoutResponse?.result?.data?.barcode;
548
+ return (h("apm-checkout", { paymentMethod: this.currentPaymentMethod, barcode: isBoleto
549
+ ? this.checkoutResponse?.result?.data?.barcode
550
+ : undefined, referenceId: this.currentPaymentMethod === PAYMENT_METHOD_ENUM.CASH && !isBoleto
551
+ ? this.checkoutResponse?.result?.data?.referenceId
552
+ : undefined, qrCodeData: this.currentPaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER
553
+ ? this.checkoutResponse?.result?.data?.qrCode
554
+ : undefined, code: this.checkoutResponse?.result?.data?.code, providerName: renewalState.data.organization?.name || '', expirationDate: (() => {
555
+ const expirationDate = new Date();
556
+ expirationDate.setDate(expirationDate.getDate() + 30);
557
+ return expirationDate.toISOString();
558
+ })(), country: renewalState.data.price.country, redirectUrl: this.checkoutResponse?.result?.data?.url, checkoutRequestId: this.checkoutResponse?.result?.checkoutRequestId, bearerToken: this.checkoutResponse?.result?.data?.bearerToken, onPaymentStatusChange: event => this.handlePaymentStatusChange(event.detail) }));
559
+ })(), isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) &&
552
560
  renderRenewalSummary({
553
561
  displayedComponents: 'summary',
554
562
  }), h("div", { style: { display: 'flex', flexDirection: 'column', gap: '16px' } }, !this.isAPMCheckoutVisible && (h("payment-button", { paymentMethod: this.currentPaymentMethod, isLoading: this.isSubmitting, isRenewal: true, trialPeriodDays: renewalState.data.subscription.trialPeriodDays, redirectUrl: !!this.checkoutResponse?.result?.data?.url, timeToRedirect: 5000, country: renewalState.data.price.country, isDisabled: renewalState.fetchingInstallments, onSubmit: () => submit() })), h("rebill-alert", { type: "secure", variant: "variant-secure", icon: "lock-outline", message: I18nService.translate('otp.secureMessage') }))), h("rebill-footer", { style: {