@economist/web-apple-pay 0.1.3-beta.51 → 0.1.3-beta.52

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/dist/index.js CHANGED
@@ -1677,7 +1677,7 @@ async function handlePaymentAuthorized(event, session, sessionData, config) {
1677
1677
  } catch (err) {
1678
1678
  if (err instanceof ContactValidationError) {
1679
1679
  const isBillingCountryMismatch = err.errors.some(
1680
- (e) => e.message === MSG_UNSUPPORTED_BILLING_COUNTRY
1680
+ (e) => e.contactField === "countryCode"
1681
1681
  );
1682
1682
  if (isBillingCountryMismatch) {
1683
1683
  const countryCode = event.payment.billingContact?.countryCode;
@@ -1672,7 +1672,7 @@ async function handlePaymentAuthorized(event, session, sessionData, config) {
1672
1672
  } catch (err) {
1673
1673
  if (err instanceof ContactValidationError) {
1674
1674
  const isBillingCountryMismatch = err.errors.some(
1675
- (e) => e.message === MSG_UNSUPPORTED_BILLING_COUNTRY
1675
+ (e) => e.contactField === "countryCode"
1676
1676
  );
1677
1677
  if (isBillingCountryMismatch) {
1678
1678
  const countryCode = event.payment.billingContact?.countryCode;
@@ -1680,7 +1680,7 @@ async function handlePaymentAuthorized(event, session, sessionData, config) {
1680
1680
  } catch (err) {
1681
1681
  if (err instanceof ContactValidationError) {
1682
1682
  const isBillingCountryMismatch = err.errors.some(
1683
- (e) => e.message === MSG_UNSUPPORTED_BILLING_COUNTRY
1683
+ (e) => e.contactField === "countryCode"
1684
1684
  );
1685
1685
  if (isBillingCountryMismatch) {
1686
1686
  const countryCode = event.payment.billingContact?.countryCode;
@@ -1672,7 +1672,7 @@ async function handlePaymentAuthorized(event, session, sessionData, config) {
1672
1672
  } catch (err) {
1673
1673
  if (err instanceof ContactValidationError) {
1674
1674
  const isBillingCountryMismatch = err.errors.some(
1675
- (e) => e.message === MSG_UNSUPPORTED_BILLING_COUNTRY
1675
+ (e) => e.contactField === "countryCode"
1676
1676
  );
1677
1677
  if (isBillingCountryMismatch) {
1678
1678
  const countryCode = event.payment.billingContact?.countryCode;
@@ -390,7 +390,7 @@ async function handlePaymentAuthorized(event, session, sessionData, config) {
390
390
  } catch (err) {
391
391
  if (err instanceof ContactValidationError) {
392
392
  const isBillingCountryMismatch = err.errors.some(
393
- (e) => e.message === MSG_UNSUPPORTED_BILLING_COUNTRY
393
+ (e) => e.contactField === "countryCode"
394
394
  );
395
395
  if (isBillingCountryMismatch) {
396
396
  const countryCode = event.payment.billingContact?.countryCode;
package/dist/src/index.js CHANGED
@@ -1677,7 +1677,7 @@ async function handlePaymentAuthorized(event, session, sessionData, config) {
1677
1677
  } catch (err) {
1678
1678
  if (err instanceof ContactValidationError) {
1679
1679
  const isBillingCountryMismatch = err.errors.some(
1680
- (e) => e.message === MSG_UNSUPPORTED_BILLING_COUNTRY
1680
+ (e) => e.contactField === "countryCode"
1681
1681
  );
1682
1682
  if (isBillingCountryMismatch) {
1683
1683
  const countryCode = event.payment.billingContact?.countryCode;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@economist/web-apple-pay",
3
3
  "description": "Web component package for Apple Pay checkout UI",
4
- "version": "0.1.3-beta.51",
4
+ "version": "0.1.3-beta.52",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",