@designcrowd/library.brand-page 6.2.4 → 6.2.5
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.
- package/lib/src/{CreatedOnBrandCrowd-de-de-ystrO2LW.js → CreatedOnBrandCrowd-de-de-CkJM0rEy.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BU7hNzTZ.js → CreatedOnBrandCrowd-en-us-CKOotMQK.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-CbuxneQ3.js → CreatedOnBrandCrowd-es-es-mrDI8AaY.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-BuNUGOFr.js → CreatedOnBrandCrowd-fr-ca-DtmVXezM.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-BuNUGOFr.js → CreatedOnBrandCrowd-fr-fr-DtmVXezM.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-BehL88mc.js → CreatedOnBrandCrowd-pt-br-C8Cy74df.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-BehL88mc.js → CreatedOnBrandCrowd-pt-pt-C8Cy74df.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CMxjFZt9.js → CreatedOnDcom-de-de-FVl5OqQM.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-2Cf6WBvx.js → CreatedOnDcom-en-us-e0s7gZGG.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-CATNnbTq.js → CreatedOnDcom-es-es-BXMekiTg.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-DQtMfB-a.js → CreatedOnDcom-fr-ca-74Vm0wzS.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-C1_FWOQf.js → CreatedOnDcom-fr-fr-C6TT73Rw.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-C0QOCW0L.js → CreatedOnDcom-pt-br-Drg2eaLk.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-lHD-p6o4.js → CreatedOnDcom-pt-pt-BgsEIMfv.js} +1 -1
- package/lib/src/bundled-translations-BNA5h0Dx.js +179 -0
- package/lib/src/bundled-translations.de-DE-fyTHrRxT.js +179 -0
- package/lib/src/bundled-translations.es-ES-BMmvJGGC.js +179 -0
- package/lib/src/bundled-translations.fr-CA-Bo69L_BP.js +179 -0
- package/lib/src/bundled-translations.fr-FR-C4yTVFOW.js +179 -0
- package/lib/src/bundled-translations.pt-BR-CPMPfny0.js +179 -0
- package/lib/src/bundled-translations.pt-PT-C6ZwYs37.js +179 -0
- package/lib/src/bundles/bundled-translations.de-DE.json +5 -1
- package/lib/src/bundles/bundled-translations.es-ES.json +5 -1
- package/lib/src/bundles/bundled-translations.fr-CA.json +5 -1
- package/lib/src/bundles/bundled-translations.fr-FR.json +5 -1
- package/lib/src/bundles/bundled-translations.json +5 -1
- package/lib/src/bundles/bundled-translations.pt-BR.json +5 -1
- package/lib/src/bundles/bundled-translations.pt-PT.json +5 -1
- package/lib/src/css/library.brand-page-brandCrowd.min.css +1 -1
- package/lib/src/css/library.brand-page-brandPage.min.css +1 -1
- package/lib/src/css/library.brand-page-designCom.min.css +1 -1
- package/lib/src/css/library.brand-page-preview.min.css +1 -1
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-CqHUUPUW.js → lib--ZDYWLFf.js} +1165 -1160
- package/package.json +1 -1
- package/src/brand-page/components/payment/RequestPaymentStripe.vue +15 -6
- package/src/brand-page/components/payment/RequestPaymentStripe.vue.test.ts +644 -0
- package/src/brand-page/components/payment/i18n/request-payment-stripe.de-DE.json +5 -1
- package/src/brand-page/components/payment/i18n/request-payment-stripe.es-ES.json +5 -1
- package/src/brand-page/components/payment/i18n/request-payment-stripe.fr-CA.json +5 -1
- package/src/brand-page/components/payment/i18n/request-payment-stripe.fr-FR.json +5 -1
- package/src/brand-page/components/payment/i18n/request-payment-stripe.json +5 -1
- package/src/brand-page/components/payment/i18n/request-payment-stripe.pt-BR.json +5 -1
- package/src/brand-page/components/payment/i18n/request-payment-stripe.pt-PT.json +5 -1
- package/src/bundles/bundled-translations.de-DE.json +5 -1
- package/src/bundles/bundled-translations.es-ES.json +5 -1
- package/src/bundles/bundled-translations.fr-CA.json +5 -1
- package/src/bundles/bundled-translations.fr-FR.json +5 -1
- package/src/bundles/bundled-translations.json +5 -1
- package/src/bundles/bundled-translations.pt-BR.json +5 -1
- package/src/bundles/bundled-translations.pt-PT.json +5 -1
- package/lib/src/bundled-translations-BYUfWBT3.js +0 -179
- package/lib/src/bundled-translations.de-DE-MmzUu1tt.js +0 -179
- package/lib/src/bundled-translations.es-ES-D-tG33XL.js +0 -179
- package/lib/src/bundled-translations.fr-CA-CNc1H1h3.js +0 -179
- package/lib/src/bundled-translations.fr-FR-DX0-yepT.js +0 -179
- package/lib/src/bundled-translations.pt-BR-ih1-LRgy.js +0 -179
- package/lib/src/bundled-translations.pt-PT-Dq2CmD1p.js +0 -179
- package/lib/src/metadata-builder/builders/reorder-pages-builder.d.ts +0 -13
- package/lib/src/metadata-builder/builders/reorder-pages-builder.js +0 -49
- package/src/metadata-builder/builders/reorder-pages-builder.ts +0 -80
package/package.json
CHANGED
|
@@ -164,6 +164,7 @@ import {
|
|
|
164
164
|
type ButtonStyles,
|
|
165
165
|
type CheckoutInformation,
|
|
166
166
|
type CreateCartResult,
|
|
167
|
+
type CreateStripePaymentIntentResponse,
|
|
167
168
|
type StripePaymentIntent,
|
|
168
169
|
type StripeShippingDetails,
|
|
169
170
|
} from '../../models';
|
|
@@ -363,7 +364,7 @@ const initStripeElements = (): void => {
|
|
|
363
364
|
|
|
364
365
|
cardNumberElement.value = stripeElements.create('cardNumber', {
|
|
365
366
|
style: constants.stripeDefaultStyle,
|
|
366
|
-
placeholder: '
|
|
367
|
+
placeholder: requestPaymentStripeTr('cardNumberPlaceholder'),
|
|
367
368
|
});
|
|
368
369
|
if (cardNumberRef.value) {
|
|
369
370
|
cardNumberElement.value.mount(cardNumberRef.value);
|
|
@@ -372,7 +373,7 @@ const initStripeElements = (): void => {
|
|
|
372
373
|
|
|
373
374
|
cardExpiryElement.value = stripeElements.create('cardExpiry', {
|
|
374
375
|
style: constants.stripeDefaultStyle,
|
|
375
|
-
placeholder: '
|
|
376
|
+
placeholder: requestPaymentStripeTr('cardExpiryPlaceholder'),
|
|
376
377
|
});
|
|
377
378
|
if (cardExpiryRef.value) {
|
|
378
379
|
cardExpiryElement.value.mount(cardExpiryRef.value);
|
|
@@ -381,7 +382,7 @@ const initStripeElements = (): void => {
|
|
|
381
382
|
|
|
382
383
|
cardCvcElement.value = stripeElements.create('cardCvc', {
|
|
383
384
|
style: constants.stripeDefaultStyle,
|
|
384
|
-
placeholder: '
|
|
385
|
+
placeholder: requestPaymentStripeTr('cardCvcPlaceholder'),
|
|
385
386
|
});
|
|
386
387
|
if (cardCvcRef.value) {
|
|
387
388
|
cardCvcElement.value.mount(cardCvcRef.value);
|
|
@@ -441,10 +442,15 @@ const onSubmitPaymentClick = async (): Promise<void> => {
|
|
|
441
442
|
}
|
|
442
443
|
|
|
443
444
|
isBusy.value = true;
|
|
445
|
+
submitError.value = undefined;
|
|
444
446
|
|
|
445
447
|
try {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
+
let paymentIntentResponse: CreateStripePaymentIntentResponse | null = null;
|
|
449
|
+
|
|
450
|
+
// Only the intent request is caught: nothing is charged before it, so
|
|
451
|
+
// "try again" is safe here but not after confirmCardPayment.
|
|
452
|
+
try {
|
|
453
|
+
paymentIntentResponse = await brandPageClient.createStripePaymentIntent({
|
|
448
454
|
cartId: props.cart.cartId,
|
|
449
455
|
customerEmail: emailAddress.value,
|
|
450
456
|
customerRequestDetails:
|
|
@@ -455,10 +461,13 @@ const onSubmitPaymentClick = async (): Promise<void> => {
|
|
|
455
461
|
? shippingDetails.value
|
|
456
462
|
: undefined,
|
|
457
463
|
});
|
|
464
|
+
} catch (err) {
|
|
465
|
+
console.error(err);
|
|
466
|
+
}
|
|
458
467
|
|
|
459
468
|
if (!paymentIntentResponse) {
|
|
460
469
|
submitError.value = new Error(
|
|
461
|
-
'
|
|
470
|
+
requestPaymentStripeTr('paymentIntentErrorMessage'),
|
|
462
471
|
);
|
|
463
472
|
|
|
464
473
|
return;
|