@zonos/elements 1.3.38 → 1.3.40

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 (282) hide show
  1. package/dist/cjs/{cart-c7212410.js → cart-775440b7.js} +240 -7
  2. package/dist/cjs/{getBorderRadius-074b46ef.js → getBorderRadius-9ae7890c.js} +1 -1
  3. package/dist/cjs/{index-b071017b.js → index-ef8b2c76.js} +234 -167
  4. package/dist/cjs/index.cjs.js +10 -4
  5. package/dist/cjs/{isDarkColor-371a3b1a.js → isDarkColor-5f56770b.js} +1 -1
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/paypal-25c84e33.js +461 -0
  8. package/dist/cjs/{submitGtag-7a679d92.js → sendErrorLog-7818b288.js} +2 -19
  9. package/dist/cjs/zonos-address_8.cjs.entry.js +8 -8
  10. package/dist/cjs/zonos-badge_2.cjs.entry.js +2 -2
  11. package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
  13. package/dist/cjs/zonos-card.cjs.entry.js +3 -3
  14. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +73 -35
  15. package/dist/cjs/zonos-checkout.cjs.entry.js +50 -70
  16. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  17. package/dist/cjs/zonos-controller.cjs.entry.js +15 -15
  18. package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
  19. package/dist/cjs/zonos-country-select_3.cjs.entry.js +5 -5
  20. package/dist/cjs/zonos-elements.cjs.js +3 -3
  21. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
  22. package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
  23. package/dist/cjs/zonos-input.cjs.entry.js +3 -3
  24. package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
  25. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  26. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  27. package/dist/cjs/{zonos-notification_2.cjs.entry.js → zonos-notification_3.cjs.entry.js} +59 -7
  28. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
  29. package/dist/cjs/zonos-text.cjs.entry.js +2 -2
  30. package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
  31. package/dist/cjs/{zonosStore-4c6c85da.js → zonosStore-b6c72408.js} +5 -1
  32. package/dist/collection/__tests__/build-utils/urlCheckOne.js +3 -1
  33. package/dist/collection/collection-manifest.json +2 -1
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.css +1 -0
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +39 -8
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.css +1 -0
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +7 -1
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +37 -22
  39. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +3 -0
  40. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +37 -60
  41. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +1 -0
  42. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +1 -0
  43. package/dist/collection/components/main/zonos-controller.js +22 -8
  44. package/dist/collection/components/paypal/zonos-paypal-payment.css +37 -0
  45. package/dist/collection/components/paypal/zonos-paypal-payment.js +92 -0
  46. package/dist/collection/components/store/checkout/cart.js +26 -1
  47. package/dist/collection/components/store/checkout/paypal.js +219 -0
  48. package/dist/collection/components/store/checkout/stripe.js +16 -4
  49. package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
  50. package/dist/collection/components/store/translationStore/strings.base.js +9 -0
  51. package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
  52. package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
  53. package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
  54. package/dist/collection/components/store/translationStore/strings.french.js +9 -0
  55. package/dist/collection/components/store/translationStore/strings.german.js +9 -0
  56. package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
  57. package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
  58. package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
  59. package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
  60. package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
  61. package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
  62. package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
  63. package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
  64. package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
  65. package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
  66. package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
  67. package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
  68. package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
  69. package/dist/collection/components/store/zonosStore.js +4 -0
  70. package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -2
  71. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
  72. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +2 -3
  73. package/dist/collection/components/utils/api/getZonosSettings.js +3 -3
  74. package/dist/collection/components/utils/api/paypalCaptureOrder.js +8 -0
  75. package/dist/collection/components/utils/api/paypalCreateOrder.js +8 -0
  76. package/dist/collection/components/utils/getContrastColor.js +6 -2
  77. package/dist/collection/components/utils/handleFetch.js +6 -1
  78. package/dist/collection/components/utils/isContrastColor.js +7 -0
  79. package/dist/collection/environment.js +4 -5
  80. package/dist/collection/scripts/_getZonosQaUrl.js +4 -0
  81. package/dist/collection/scripts/_zonosBase.js +2 -0
  82. package/dist/collection/styles/stripe/addressRuleStyle.js +6 -0
  83. package/dist/collection/types/generated/graphql.customer.types.js +35 -0
  84. package/dist/esm/{cart-eb75b113.js → cart-e9cd8286.js} +236 -8
  85. package/dist/esm/{getBorderRadius-947c24de.js → getBorderRadius-3c75c4c1.js} +1 -1
  86. package/dist/esm/{index-3b46f3c3.js → index-5a37ccde.js} +234 -167
  87. package/dist/esm/index.js +10 -4
  88. package/dist/esm/{isDarkColor-f8324c10.js → isDarkColor-3eb31a6d.js} +1 -1
  89. package/dist/esm/loader.js +3 -3
  90. package/dist/esm/paypal-da2b3db1.js +453 -0
  91. package/dist/esm/{submitGtag-0bc0baa0.js → sendErrorLog-2fcf78a2.js} +3 -19
  92. package/dist/esm/zonos-address_8.entry.js +8 -8
  93. package/dist/esm/zonos-badge_2.entry.js +2 -2
  94. package/dist/esm/zonos-banner.entry.js +2 -2
  95. package/dist/esm/zonos-button_3.entry.js +4 -4
  96. package/dist/esm/zonos-card.entry.js +3 -3
  97. package/dist/esm/zonos-cart-items_12.entry.js +60 -22
  98. package/dist/esm/zonos-checkout.entry.js +41 -61
  99. package/dist/esm/zonos-component.entry.js +1 -1
  100. package/dist/esm/zonos-controller.entry.js +15 -15
  101. package/dist/esm/zonos-country-flag.entry.js +5 -5
  102. package/dist/esm/zonos-country-select_3.entry.js +5 -5
  103. package/dist/esm/zonos-elements.js +4 -4
  104. package/dist/esm/zonos-hello-dialog.entry.js +5 -5
  105. package/dist/esm/zonos-hello.entry.js +5 -5
  106. package/dist/esm/zonos-input.entry.js +3 -3
  107. package/dist/esm/zonos-language-select_2.entry.js +5 -5
  108. package/dist/esm/zonos-link.entry.js +1 -1
  109. package/dist/esm/zonos-logo.entry.js +2 -2
  110. package/dist/esm/{zonos-notification_2.entry.js → zonos-notification_3.entry.js} +60 -9
  111. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
  112. package/dist/esm/zonos-text.entry.js +2 -2
  113. package/dist/esm/zonos-v-stack.entry.js +2 -2
  114. package/dist/esm/{zonosStore-ba9e541e.js → zonosStore-425abc1b.js} +5 -1
  115. package/dist/esm-es5/cart-e9cd8286.js +1 -0
  116. package/dist/esm-es5/{getBorderRadius-947c24de.js → getBorderRadius-3c75c4c1.js} +1 -1
  117. package/dist/esm-es5/index-5a37ccde.js +2 -0
  118. package/dist/esm-es5/index.js +1 -1
  119. package/dist/esm-es5/{isDarkColor-f8324c10.js → isDarkColor-3eb31a6d.js} +1 -1
  120. package/dist/esm-es5/loader.js +1 -1
  121. package/dist/esm-es5/paypal-da2b3db1.js +17 -0
  122. package/dist/esm-es5/sendErrorLog-2fcf78a2.js +1 -0
  123. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  124. package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
  125. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  126. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  127. package/dist/esm-es5/zonos-card.entry.js +1 -1
  128. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  129. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  130. package/dist/esm-es5/zonos-component.entry.js +1 -1
  131. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  132. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  133. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  134. package/dist/esm-es5/zonos-elements.js +1 -1
  135. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  136. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  137. package/dist/esm-es5/zonos-input.entry.js +1 -1
  138. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  139. package/dist/esm-es5/zonos-link.entry.js +1 -1
  140. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  141. package/dist/esm-es5/zonos-notification_3.entry.js +1 -0
  142. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  143. package/dist/esm-es5/zonos-text.entry.js +1 -1
  144. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  145. package/dist/esm-es5/{zonosStore-ba9e541e.js → zonosStore-425abc1b.js} +1 -1
  146. package/dist/scripts/index.d.ts +91 -6
  147. package/dist/scripts/index.js +1 -1
  148. package/dist/scripts/loadZonos.js +1 -1
  149. package/dist/scripts/zonos.js +1 -1
  150. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +2 -1
  151. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +8 -4
  152. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +1 -20
  153. package/dist/types/components/main/zonos-controller.d.ts +6 -0
  154. package/dist/types/components/paypal/zonos-paypal-payment.d.ts +17 -0
  155. package/dist/types/components/store/checkout/cart.d.ts +19 -1
  156. package/dist/types/components/store/checkout/paypal.d.ts +28 -0
  157. package/dist/types/components/store/checkout/stripe.d.ts +10 -1
  158. package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
  159. package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
  160. package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
  161. package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
  162. package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
  163. package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
  164. package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
  165. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
  166. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
  167. package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
  168. package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
  169. package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
  170. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
  171. package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
  172. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
  173. package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
  174. package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
  175. package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
  176. package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
  177. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
  178. package/dist/types/components/store/translationStore.d.ts +1 -1
  179. package/dist/types/components/store/zonosStore.d.ts +4 -0
  180. package/dist/types/components/utils/api/getZonosSettings.d.ts +2 -0
  181. package/dist/types/components/utils/api/paypalCaptureOrder.d.ts +10 -0
  182. package/dist/types/components/utils/api/paypalCreateOrder.d.ts +9 -0
  183. package/dist/types/components/utils/handleFetch.d.ts +4 -0
  184. package/dist/types/components/utils/isContrastColor.d.ts +4 -0
  185. package/dist/types/components.d.ts +50 -6
  186. package/dist/types/scripts/_zonosBase.d.ts +9 -1
  187. package/dist/types/stencil-public-runtime.d.ts +3 -10
  188. package/dist/types/types/checkout/CheckoutConfig.d.ts +14 -1
  189. package/dist/types/types/generated/graphql.customer.types.d.ts +71 -11
  190. package/dist/types/types/generated/graphql.customer.types.ts +103 -11
  191. package/dist/zonos-elements/index.esm.js +1 -1
  192. package/dist/zonos-elements/{p-ed333de6.system.entry.js → p-01bd2187.system.entry.js} +1 -1
  193. package/dist/zonos-elements/{p-f06bb776.system.entry.js → p-14b53e8f.system.entry.js} +1 -1
  194. package/dist/zonos-elements/p-15ecad81.entry.js +1 -0
  195. package/dist/zonos-elements/p-1b499bcc.system.js +1 -0
  196. package/dist/zonos-elements/{p-d2992457.system.entry.js → p-1daa3b1e.system.entry.js} +1 -1
  197. package/dist/zonos-elements/{p-085548f2.entry.js → p-1debb7b2.entry.js} +1 -1
  198. package/dist/zonos-elements/{p-9de374a7.system.entry.js → p-2bfb5e4b.system.entry.js} +1 -1
  199. package/dist/zonos-elements/{p-01304a58.system.entry.js → p-2c03ac78.system.entry.js} +1 -1
  200. package/dist/zonos-elements/p-3447ef24.system.js +17 -0
  201. package/dist/zonos-elements/{p-699a5376.entry.js → p-3496183d.entry.js} +1 -1
  202. package/dist/zonos-elements/{p-59f37de3.entry.js → p-36df9785.entry.js} +1 -1
  203. package/dist/zonos-elements/p-3996d025.system.js +1 -0
  204. package/dist/zonos-elements/p-3b6a7200.entry.js +1 -0
  205. package/dist/zonos-elements/p-3d98f422.system.entry.js +1 -0
  206. package/dist/zonos-elements/{p-31b3d26b.js → p-3da1bc42.js} +1 -1
  207. package/dist/zonos-elements/{p-a21ec316.system.entry.js → p-445fb353.system.entry.js} +1 -1
  208. package/dist/zonos-elements/{p-3541e6dd.entry.js → p-54101ed6.entry.js} +1 -1
  209. package/dist/zonos-elements/p-54971a77.system.js +1 -0
  210. package/dist/zonos-elements/{p-c0fcc0fa.system.entry.js → p-5a5d1a12.system.entry.js} +1 -1
  211. package/dist/zonos-elements/{p-c21802e9.entry.js → p-5e55dcbc.entry.js} +1 -1
  212. package/dist/zonos-elements/{p-71882ac9.system.entry.js → p-5f68f356.system.entry.js} +1 -1
  213. package/dist/zonos-elements/{p-73ba4398.system.entry.js → p-61842b4f.system.entry.js} +1 -1
  214. package/dist/zonos-elements/{p-3523c3b4.entry.js → p-657be9e9.entry.js} +1 -1
  215. package/dist/zonos-elements/p-6897be29.entry.js +1 -0
  216. package/dist/zonos-elements/{p-3f5e2e5c.system.entry.js → p-6f39051c.system.entry.js} +1 -1
  217. package/dist/zonos-elements/{p-966ab4e7.system.entry.js → p-70b024ad.system.entry.js} +1 -1
  218. package/dist/zonos-elements/{p-22882fd6.entry.js → p-71037fe5.entry.js} +1 -1
  219. package/dist/zonos-elements/p-7dd54a63.entry.js +1 -0
  220. package/dist/zonos-elements/{p-e3c014ae.entry.js → p-7f96d3b4.entry.js} +1 -1
  221. package/dist/zonos-elements/p-800db524.system.js +1 -0
  222. package/dist/zonos-elements/{p-9a1c0d02.js → p-890f5788.js} +1 -1
  223. package/dist/zonos-elements/{p-62ed4236.entry.js → p-8d149b99.entry.js} +1 -1
  224. package/dist/zonos-elements/p-916adba7.entry.js +1 -0
  225. package/dist/zonos-elements/{p-5821856c.js → p-92bebe7a.js} +1 -1
  226. package/dist/zonos-elements/p-94279862.system.js +1 -0
  227. package/dist/zonos-elements/{p-b903af96.system.entry.js → p-97dadd90.system.entry.js} +1 -1
  228. package/dist/zonos-elements/{p-e37440ad.system.js → p-b2007124.system.js} +1 -1
  229. package/dist/zonos-elements/p-b55b557a.system.js +2 -0
  230. package/dist/zonos-elements/{p-18b28104.entry.js → p-bfa5ec2b.entry.js} +1 -1
  231. package/dist/zonos-elements/p-c55a5fe4.system.entry.js +1 -0
  232. package/dist/zonos-elements/p-c5a5512a.system.entry.js +1 -0
  233. package/dist/zonos-elements/p-c87113fb.system.entry.js +1 -0
  234. package/dist/zonos-elements/p-ca58f16e.system.entry.js +1 -0
  235. package/dist/zonos-elements/{p-6c3390b7.entry.js → p-d46fa40a.entry.js} +1 -1
  236. package/dist/zonos-elements/p-d6135575.js +1 -0
  237. package/dist/zonos-elements/p-d95cb86a.system.js +1 -0
  238. package/dist/zonos-elements/{p-d8c1eb99.entry.js → p-d9d5ee2f.entry.js} +1 -1
  239. package/dist/zonos-elements/{p-2a45c837.system.entry.js → p-da15b587.system.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-8acdf43b.system.entry.js → p-dc6a17fe.system.entry.js} +1 -1
  241. package/dist/zonos-elements/p-dd61b7a0.js +2 -0
  242. package/dist/zonos-elements/p-e252d86f.entry.js +1 -0
  243. package/dist/zonos-elements/{p-da2e5289.system.entry.js → p-e6efc2e1.system.entry.js} +1 -1
  244. package/dist/zonos-elements/{p-63a27875.entry.js → p-efdc7748.entry.js} +1 -1
  245. package/dist/zonos-elements/{p-2aa72606.entry.js → p-f643035f.entry.js} +1 -1
  246. package/dist/zonos-elements/p-f98f7066.js +17 -0
  247. package/dist/zonos-elements/{p-9d29f3f4.system.entry.js → p-fa02dd07.system.entry.js} +1 -1
  248. package/dist/zonos-elements/{p-c3619b3d.entry.js → p-fa95c3dc.entry.js} +1 -1
  249. package/dist/zonos-elements/p-fb63bd03.js +1 -0
  250. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  251. package/dist/zonos-elements/zonos-elements.js +1 -1
  252. package/loader/cdn.js +1 -2
  253. package/loader/index.cjs.js +1 -2
  254. package/loader/index.d.ts +3 -0
  255. package/loader/index.es2017.js +1 -2
  256. package/loader/index.js +1 -2
  257. package/package.json +12 -11
  258. package/dist/esm-es5/cart-eb75b113.js +0 -1
  259. package/dist/esm-es5/index-3b46f3c3.js +0 -2
  260. package/dist/esm-es5/submitGtag-0bc0baa0.js +0 -1
  261. package/dist/esm-es5/zonos-notification_2.entry.js +0 -1
  262. package/dist/zonos-elements/p-02405211.system.entry.js +0 -1
  263. package/dist/zonos-elements/p-0b538ed4.system.js +0 -1
  264. package/dist/zonos-elements/p-357322ea.system.entry.js +0 -1
  265. package/dist/zonos-elements/p-467f934c.system.entry.js +0 -1
  266. package/dist/zonos-elements/p-53acc999.js +0 -1
  267. package/dist/zonos-elements/p-548ac127.entry.js +0 -1
  268. package/dist/zonos-elements/p-5609876a.system.entry.js +0 -1
  269. package/dist/zonos-elements/p-57617755.entry.js +0 -1
  270. package/dist/zonos-elements/p-6f9448bb.entry.js +0 -1
  271. package/dist/zonos-elements/p-70262120.system.js +0 -1
  272. package/dist/zonos-elements/p-878293fe.js +0 -1
  273. package/dist/zonos-elements/p-a8b934c2.entry.js +0 -1
  274. package/dist/zonos-elements/p-a8cb25de.system.js +0 -1
  275. package/dist/zonos-elements/p-abe8ea12.system.js +0 -1
  276. package/dist/zonos-elements/p-ad37d20e.system.js +0 -1
  277. package/dist/zonos-elements/p-ae04d3ff.entry.js +0 -1
  278. package/dist/zonos-elements/p-b684f8aa.system.entry.js +0 -1
  279. package/dist/zonos-elements/p-ce347974.js +0 -2
  280. package/dist/zonos-elements/p-d99232c5.system.js +0 -2
  281. package/dist/zonos-elements/p-e0bf9666.system.js +0 -1
  282. package/dist/zonos-elements/p-e1db1bc9.entry.js +0 -1
@@ -0,0 +1,219 @@
1
+ import { loadScript, } from "@paypal/paypal-js";
2
+ import { createStore } from "@stencil/store";
3
+ import { cartStore, cartStoreClearCheckoutInterval, cartStoreNextStep, } from "./cart";
4
+ import { stripeStoreHandleInventoryCheck } from "./stripe";
5
+ import { translate } from "../translationStore";
6
+ import { zonosStore } from "../zonosStore";
7
+ import { paypalCaptureOrder } from "../../utils/api/paypalCaptureOrder";
8
+ import { paypalCreateOrder } from "../../utils/api/paypalCreateOrder";
9
+ import { isContrastColor } from "../../utils/isContrastColor";
10
+ import { jsonParse } from "../../utils/jsonParse";
11
+ import { log } from "../../utils/logging/log";
12
+ import { logError } from "../../utils/logging/logError";
13
+ import { submitGtag } from "../../utils/submitGtag";
14
+ const { reset: paypalStoreReset, state: paypalStore } = createStore(() => ({
15
+ orderIdCreated: null,
16
+ paypalButtons: [],
17
+ paypalClientId: '',
18
+ paypalErrorMessage: null,
19
+ }));
20
+ const paypalStoreCreaterOrder = async ({ checkoutSessionId, }) => {
21
+ var _a, _b;
22
+ const { errors, json } = await paypalCreateOrder({
23
+ checkoutSessionId,
24
+ });
25
+ const paypalOrderId = (_a = json === null || json === void 0 ? void 0 : json.paypalOrderCreate) === null || _a === void 0 ? void 0 : _a.paypalOrderId;
26
+ if (errors.length || !paypalOrderId) {
27
+ throw new Error(((_b = errors.find(Boolean)) === null || _b === void 0 ? void 0 : _b.message) ||
28
+ 'An unexpected error occurred when creating paypal order.');
29
+ }
30
+ return paypalOrderId;
31
+ };
32
+ const paypalStoreCaptureOrder = async ({ checkoutSessionId, paypalMockResponse, }) => {
33
+ var _a, _b;
34
+ const {} = new URL(window.location.href);
35
+ const { errors, json } = await paypalCaptureOrder({
36
+ checkoutSessionId,
37
+ paypalMockResponse,
38
+ });
39
+ const zonosOrderId = (_a = json === null || json === void 0 ? void 0 : json.paypalOrderCapture.order) === null || _a === void 0 ? void 0 : _a.id;
40
+ if (errors.length || !zonosOrderId) {
41
+ throw new Error(((_b = errors.find(Boolean)) === null || _b === void 0 ? void 0 : _b.message) ||
42
+ translate('An unexpected error occurred when processing PayPal order.'));
43
+ }
44
+ return zonosOrderId;
45
+ };
46
+ const paypalErrorHandler = ({ error }) => {
47
+ var _a;
48
+ const parsedResult = jsonParse(error.message);
49
+ const paypalErrorMessage = (_a = parsedResult === null || parsedResult === void 0 ? void 0 : parsedResult.errors.find(Boolean)) === null || _a === void 0 ? void 0 : _a.message;
50
+ const parsedErrorMessage = (paypalErrorMessage === null || paypalErrorMessage === void 0 ? void 0 : paypalErrorMessage.match(/\[(.*?)\] (.*)/i)) || [];
51
+ if (!parsedErrorMessage) {
52
+ paypalStore.paypalErrorMessage = translate('An unexpected error occurred when processing PayPal order.');
53
+ }
54
+ const errorMessage = parsedErrorMessage[2] ||
55
+ translate('An unexpected error occurred when processing PayPal order.');
56
+ // show the error message
57
+ paypalStore.paypalErrorMessage = errorMessage;
58
+ };
59
+ /**
60
+ * This function generates the options for the PayPal button component.
61
+ * It first retrieves the primary color from the store and checks if it contrasts with PayPal's gold color.
62
+ * It then returns an object with the createOrder function and the style for the PayPal button.
63
+ * The createOrder function makes a call to the PayPal API to create an order and returns the order ID.
64
+ * The style object sets the border radius, color, and shape of the PayPal button.
65
+ */
66
+ const paypalButtonOptions = ({ checkoutSessionId, onPaypalFail, onPaypalSessionDone, overrideBorderRaidus, overridePrimaryColor, }) => {
67
+ const colorPrimary = overridePrimaryColor || zonosStore.appearance.colorPrimary;
68
+ // Paypal gold color
69
+ const paypalGoldColorHex = '#ffc33a';
70
+ // check if the paypal gold color is contrast to the background
71
+ const isContrast = isContrastColor({
72
+ backgroundColor1: paypalGoldColorHex,
73
+ backgroundColor2: colorPrimary || '',
74
+ });
75
+ return {
76
+ createOrder: async () => {
77
+ try {
78
+ // reset paypal error banner
79
+ paypalStore.paypalErrorMessage = null;
80
+ // reset inventory check error message
81
+ cartStore.inventoryCheckErrorMessage = null;
82
+ try {
83
+ // check inventory before proceeding to payment
84
+ cartStore.inventoryCheckErrorMessage =
85
+ await stripeStoreHandleInventoryCheck();
86
+ }
87
+ catch (err) {
88
+ // If user provide callback and it throw an exception, default to this message and stop the payment.
89
+ cartStore.inventoryCheckErrorMessage = translate('Unable to check inventory. Please try again.');
90
+ }
91
+ // Don't proceed to payment if there's an error message
92
+ if (cartStore.inventoryCheckErrorMessage) {
93
+ return '';
94
+ }
95
+ const paypalOrderId = await paypalStoreCreaterOrder({
96
+ checkoutSessionId,
97
+ });
98
+ return paypalOrderId;
99
+ }
100
+ catch (err) {
101
+ logError('Failed to create paypal order', err);
102
+ paypalStore.paypalErrorMessage = translate('Failed to create PayPal order. Please try again, or consider using an alternative method.');
103
+ // trigger fail event
104
+ onPaypalFail === null || onPaypalFail === void 0 ? void 0 : onPaypalFail();
105
+ return '';
106
+ }
107
+ },
108
+ onApprove: async (_, _actions) => {
109
+ try {
110
+ // reset paypal error banner
111
+ paypalStore.paypalErrorMessage = null;
112
+ // submit google tag when the form is complete
113
+ submitGtag('zonos-checkout-payment-info');
114
+ const orderId = await paypalStoreCaptureOrder({
115
+ checkoutSessionId,
116
+ paypalMockResponse: window.Zonos._paypalMockResponse,
117
+ });
118
+ paypalStore.orderIdCreated = orderId;
119
+ onPaypalSessionDone === null || onPaypalSessionDone === void 0 ? void 0 : onPaypalSessionDone({ orderId });
120
+ cartStoreNextStep();
121
+ // clear the checkout session timeout timer when purchase is complete
122
+ cartStoreClearCheckoutInterval();
123
+ }
124
+ catch (error) {
125
+ logError('==== Failed to capture paypal order', error);
126
+ if (error instanceof Error) {
127
+ return paypalErrorHandler({ error });
128
+ }
129
+ onPaypalFail === null || onPaypalFail === void 0 ? void 0 : onPaypalFail();
130
+ }
131
+ },
132
+ style: {
133
+ // @ts-ignore
134
+ borderRadius: overrideBorderRaidus === 'SHARP' ? 0 : 10,
135
+ color: isContrast ? 'gold' : 'blue',
136
+ shape: 'rect',
137
+ },
138
+ };
139
+ };
140
+ const paypalStoreResetButtons = () => {
141
+ if (!paypalStore.paypalButtons.length) {
142
+ // Do nothing if the buttons array is already empty
143
+ return;
144
+ }
145
+ // Close all paypal buttons so we can re-init them
146
+ paypalStore.paypalButtons.forEach(async (button) => {
147
+ await button.close();
148
+ });
149
+ // clean up the buttons
150
+ paypalStore.paypalButtons = [];
151
+ };
152
+ const paypalInitScript = async ({ currency }) => {
153
+ var _a;
154
+ //
155
+ const isPaypalEnabled = !!((_a = zonosStore.checkoutSettings.externalPaymentMethods) === null || _a === void 0 ? void 0 : _a.find(item => item.type === 'PAYPAL' && item.status === 'ENABLED'));
156
+ if (!isPaypalEnabled) {
157
+ log('=== Paypal is disabled for this store', 'warn');
158
+ return;
159
+ }
160
+ const paypalClientId = zonosStore.checkoutSettings.externalServiceTokens.find(item => item.type === 'PAYPAL_CLIENT_ID');
161
+ if (!paypalClientId) {
162
+ log('Fail to load paypal -- missing paypal publishable key', 'warn');
163
+ return;
164
+ }
165
+ /**
166
+ * Paypal environment should be 'production' only when the API is in production environment and the checkout mode is not 'TEST' (sandbox mode)
167
+ */
168
+ const environment = zonosStore.zonosMode === 'production' &&
169
+ zonosStore.checkoutSettings.mode === 'LIVE'
170
+ ? 'production'
171
+ : 'sandbox';
172
+ // send paypal publishable key out to load paypal
173
+ window.Zonos.paypal = await loadScript({
174
+ clientId: paypalClientId.token,
175
+ currency,
176
+ environment,
177
+ });
178
+ log('==== Paypal script loaded');
179
+ };
180
+ const paypalStoreInitButtons = (props) => {
181
+ var _a;
182
+ const paypal = window.Zonos.paypal;
183
+ if (!paypal) {
184
+ log('Paypal is not available');
185
+ return null;
186
+ }
187
+ const checkoutSessionId = cartStore.checkoutSessionId;
188
+ if (!checkoutSessionId) {
189
+ log('Paypal is not available due to checkoutSessionId is not available');
190
+ return null;
191
+ }
192
+ log('==== Loading Paypal buttons');
193
+ paypalStoreResetButtons();
194
+ const fundingSources = [(_a = paypal.FUNDING) === null || _a === void 0 ? void 0 : _a.PAYPAL].filter(Boolean);
195
+ paypalStore.paypalButtons = fundingSources
196
+ .map(fundingSource => {
197
+ var _a;
198
+ let button = null;
199
+ try {
200
+ button =
201
+ ((_a = paypal.Buttons) === null || _a === void 0 ? void 0 : _a.call(paypal, Object.assign(Object.assign({}, paypalButtonOptions(Object.assign({ checkoutSessionId,
202
+ fundingSource }, props))), { fundingSource }))) || null;
203
+ }
204
+ catch (err) {
205
+ log(`===== Fail to load paypal's "${fundingSource}" button`, 'warn', err);
206
+ }
207
+ if (button === null || button === void 0 ? void 0 : button.isEligible()) {
208
+ log(`==== Paypal button ${fundingSource} loaded`);
209
+ return button;
210
+ }
211
+ return null;
212
+ })
213
+ .filter(Boolean);
214
+ return paypalStore.paypalButtons;
215
+ };
216
+ const paypalStoreHasPaypalEnabled = () => {
217
+ return !!paypalStore.paypalButtons.length;
218
+ };
219
+ export { paypalInitScript, paypalStore, paypalStoreCreaterOrder, paypalStoreHasPaypalEnabled, paypalStoreInitButtons, paypalStoreReset, };
@@ -15,6 +15,7 @@ import { defaultVariable } from "../../../styles/stripe/defaultVariable";
15
15
  const { onChange, reset, state: stripeStore, } = createStore(() => ({
16
16
  clientSecret: sessionStorage.getItem('zonos--client-secret') || null,
17
17
  fetchingLandedCostAbordController: null,
18
+ hasPaymentError: false,
18
19
  isFetchingLandedCost: false,
19
20
  isFetchingSession: false,
20
21
  stripe: null,
@@ -237,7 +238,7 @@ const stripeStorePrefetchLandedCost = async () => {
237
238
  stripeStore.isFetchingLandedCost = false;
238
239
  }
239
240
  };
240
- const getStripeMessageBasedOnStatus = (status) => {
241
+ const stripeStoreMessageBasedOnStatus = (status) => {
241
242
  let messages = [];
242
243
  let isError = true;
243
244
  // Inspect the PaymentIntent `status` to indicate the status of the payment
@@ -281,10 +282,21 @@ const getStripeMessageBasedOnStatus = (status) => {
281
282
  messages,
282
283
  };
283
284
  };
285
+ /**
286
+ * Handle inventory check and returns error message if the callback provided.
287
+ */
288
+ const stripeStoreHandleInventoryCheck = async () => {
289
+ const { onInventoryCheck } = zonosStore.checkoutSettings;
290
+ if (typeof onInventoryCheck !== 'function') {
291
+ return null;
292
+ }
293
+ const message = await onInventoryCheck({ items: cartStore.items });
294
+ return message;
295
+ };
284
296
  const stripeStoreRetrievePayment = async ({ clientSecret: _clientSecret, storybookForceStatus, }) => {
285
297
  if (storybookForceStatus) {
286
298
  // return status right away if we are in storybook mode
287
- const { isError, messages } = getStripeMessageBasedOnStatus(storybookForceStatus);
299
+ const { isError, messages } = stripeStoreMessageBasedOnStatus(storybookForceStatus);
288
300
  return { error: isError, messages };
289
301
  }
290
302
  const clientSecret = _clientSecret || stripeStore.clientSecret;
@@ -294,7 +306,7 @@ const stripeStoreRetrievePayment = async ({ clientSecret: _clientSecret, storybo
294
306
  }
295
307
  const { paymentIntent } = await stripeStore.stripe.retrievePaymentIntent(clientSecret);
296
308
  const status = paymentIntent === null || paymentIntent === void 0 ? void 0 : paymentIntent.status;
297
- const { isError, messages } = getStripeMessageBasedOnStatus(status);
309
+ const { isError, messages } = stripeStoreMessageBasedOnStatus(status);
298
310
  return {
299
311
  error: isError,
300
312
  messages,
@@ -522,4 +534,4 @@ onChange('clientSecret', clientSecret => {
522
534
  sessionStorage.removeItem('zonos--client-secret');
523
535
  }
524
536
  });
525
- export { initStripeElements, stripeStore, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreGetDomesticShippingSession, stripeStoreInitCheckoutSession, stripeStorePrefetchLandedCost, stripeStoreReset, stripeStoreRetrievePayment, stripeStoreSaveDomesticShippingSession, stripeStoreTranslateAddressToLatin, stripeStoreUpdateCheckoutSession, };
537
+ export { initStripeElements, stripeStore, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreGetDomesticShippingSession, stripeStoreHandleInventoryCheck, stripeStoreInitCheckoutSession, stripeStoreMessageBasedOnStatus, stripeStorePrefetchLandedCost, stripeStoreReset, stripeStoreRetrievePayment, stripeStoreSaveDomesticShippingSession, stripeStoreTranslateAddressToLatin, stripeStoreUpdateCheckoutSession, };
@@ -11,6 +11,9 @@ export const stringsArabic = {
11
11
  'Address line 2': {
12
12
  value: 'سطر العنوان 2',
13
13
  },
14
+ 'An unexpected error occurred when processing PayPal order.': {
15
+ value: 'حدث خطأ غير متوقع عند معالجة طلب PayPal.',
16
+ },
14
17
  'Are you sure?': {
15
18
  value: 'هل أنت متأكد؟',
16
19
  },
@@ -92,6 +95,9 @@ export const stringsArabic = {
92
95
  'Expected delivery': {
93
96
  value: 'التوصيل المتوقع',
94
97
  },
98
+ 'Failed to create PayPal order. Please try again, or consider using an alternative method.': {
99
+ value: 'فشل في إنشاء طلب PayPal. يرجى المحاولة مرة أخرى، أو النظر في استخدام طريقة بديلة.',
100
+ },
95
101
  Failure: {
96
102
  value: 'فشل',
97
103
  },
@@ -317,6 +323,9 @@ export const stringsArabic = {
317
323
  'click to learn more': {
318
324
  value: 'انقر لمعرفة المزيد',
319
325
  },
326
+ or: {
327
+ value: 'أو',
328
+ },
320
329
  'restricted items': {
321
330
  value: 'عناصر مقيدة',
322
331
  },
@@ -11,6 +11,9 @@ export const stringsBase = {
11
11
  'Address line 2': {
12
12
  value: 'Address line 2',
13
13
  },
14
+ 'An unexpected error occurred when processing PayPal order.': {
15
+ value: 'An unexpected error occurred when processing PayPal order.',
16
+ },
14
17
  'Are you sure?': {
15
18
  value: 'Are you sure?',
16
19
  },
@@ -92,6 +95,9 @@ export const stringsBase = {
92
95
  'Expected delivery': {
93
96
  value: 'Expected delivery',
94
97
  },
98
+ 'Failed to create PayPal order. Please try again, or consider using an alternative method.': {
99
+ value: 'Failed to create PayPal order. Please try again, or consider using an alternative method.',
100
+ },
95
101
  Failure: {
96
102
  value: 'Failure',
97
103
  },
@@ -317,6 +323,9 @@ export const stringsBase = {
317
323
  'click to learn more': {
318
324
  value: 'click to learn more',
319
325
  },
326
+ or: {
327
+ value: 'or',
328
+ },
320
329
  'restricted items': {
321
330
  value: 'restricted items',
322
331
  },
@@ -11,6 +11,9 @@ export const stringsChinese = {
11
11
  'Address line 2': {
12
12
  value: '地址行2',
13
13
  },
14
+ 'An unexpected error occurred when processing PayPal order.': {
15
+ value: '处理PayPal订单时发生意外错误。',
16
+ },
14
17
  'Are you sure?': {
15
18
  value: '你确定吗?',
16
19
  },
@@ -92,6 +95,9 @@ export const stringsChinese = {
92
95
  'Expected delivery': {
93
96
  value: '预计送达',
94
97
  },
98
+ 'Failed to create PayPal order. Please try again, or consider using an alternative method.': {
99
+ value: '创建PayPal订单失败。请重试,或考虑使用其他方法。',
100
+ },
95
101
  Failure: {
96
102
  value: '失败',
97
103
  },
@@ -317,6 +323,9 @@ export const stringsChinese = {
317
323
  'click to learn more': {
318
324
  value: '点击了解更多',
319
325
  },
326
+ or: {
327
+ value: '或',
328
+ },
320
329
  'restricted items': {
321
330
  value: '限制物品',
322
331
  },
@@ -11,6 +11,9 @@ export const stringsDanish = {
11
11
  'Address line 2': {
12
12
  value: 'Adresse linje 2',
13
13
  },
14
+ 'An unexpected error occurred when processing PayPal order.': {
15
+ value: 'Der opstod en uventet fejl ved behandling af PayPal-ordren.',
16
+ },
14
17
  'Are you sure?': {
15
18
  value: 'Er du sikker?',
16
19
  },
@@ -92,6 +95,9 @@ export const stringsDanish = {
92
95
  'Expected delivery': {
93
96
  value: 'Forventet levering',
94
97
  },
98
+ 'Failed to create PayPal order. Please try again, or consider using an alternative method.': {
99
+ value: 'Kunne ikke oprette PayPal-ordre. Prøv venligst igen, eller overvej at bruge en alternativ metode.',
100
+ },
95
101
  Failure: {
96
102
  value: 'Fiasko',
97
103
  },
@@ -317,6 +323,9 @@ export const stringsDanish = {
317
323
  'click to learn more': {
318
324
  value: 'klik for at lære mere',
319
325
  },
326
+ or: {
327
+ value: 'eller',
328
+ },
320
329
  'restricted items': {
321
330
  value: 'begrænsede genstande',
322
331
  },
@@ -11,6 +11,9 @@ export const stringsDutch = {
11
11
  'Address line 2': {
12
12
  value: 'Adreslijn 2',
13
13
  },
14
+ 'An unexpected error occurred when processing PayPal order.': {
15
+ value: 'Er is een onverwachte fout opgetreden bij het verwerken van de PayPal-bestelling.',
16
+ },
14
17
  'Are you sure?': {
15
18
  value: 'Weet je het zeker?',
16
19
  },
@@ -92,6 +95,9 @@ export const stringsDutch = {
92
95
  'Expected delivery': {
93
96
  value: 'Verwachte levering',
94
97
  },
98
+ 'Failed to create PayPal order. Please try again, or consider using an alternative method.': {
99
+ value: 'Het aanmaken van de PayPal-bestelling is mislukt. Probeer het opnieuw of overweeg een alternatieve methode te gebruiken.',
100
+ },
95
101
  Failure: {
96
102
  value: 'Mislukking',
97
103
  },
@@ -317,6 +323,9 @@ export const stringsDutch = {
317
323
  'click to learn more': {
318
324
  value: 'klik om meer te leren',
319
325
  },
326
+ or: {
327
+ value: 'of',
328
+ },
320
329
  'restricted items': {
321
330
  value: 'beperkte items',
322
331
  },
@@ -11,6 +11,9 @@ export const stringsFrench = {
11
11
  'Address line 2': {
12
12
  value: 'Adresse ligne 2',
13
13
  },
14
+ 'An unexpected error occurred when processing PayPal order.': {
15
+ value: "Une erreur inattendue s'est produite lors du traitement de la commande PayPal.",
16
+ },
14
17
  'Are you sure?': {
15
18
  value: 'Es-tu sûr?',
16
19
  },
@@ -92,6 +95,9 @@ export const stringsFrench = {
92
95
  'Expected delivery': {
93
96
  value: 'Livraison prévue',
94
97
  },
98
+ 'Failed to create PayPal order. Please try again, or consider using an alternative method.': {
99
+ value: "Échec de la création de la commande PayPal. Veuillez réessayer ou envisager d'utiliser une méthode alternative.",
100
+ },
95
101
  Failure: {
96
102
  value: 'Échec',
97
103
  },
@@ -317,6 +323,9 @@ export const stringsFrench = {
317
323
  'click to learn more': {
318
324
  value: 'cliquez pour en savoir plus',
319
325
  },
326
+ or: {
327
+ value: 'ou',
328
+ },
320
329
  'restricted items': {
321
330
  value: 'articles restreints',
322
331
  },
@@ -11,6 +11,9 @@ export const stringsGerman = {
11
11
  'Address line 2': {
12
12
  value: 'Adresszeile 2',
13
13
  },
14
+ 'An unexpected error occurred when processing PayPal order.': {
15
+ value: 'Beim Verarbeiten der PayPal-Bestellung ist ein unerwarteter Fehler aufgetreten.',
16
+ },
14
17
  'Are you sure?': {
15
18
  value: 'Bist du sicher?',
16
19
  },
@@ -92,6 +95,9 @@ export const stringsGerman = {
92
95
  'Expected delivery': {
93
96
  value: 'Voraussichtliche Lieferung',
94
97
  },
98
+ 'Failed to create PayPal order. Please try again, or consider using an alternative method.': {
99
+ value: 'Fehler beim Erstellen der PayPal-Bestellung. Bitte versuchen Sie es erneut oder erwägen Sie die Verwendung einer alternativen Methode.',
100
+ },
95
101
  Failure: {
96
102
  value: 'Misserfolg',
97
103
  },
@@ -317,6 +323,9 @@ export const stringsGerman = {
317
323
  'click to learn more': {
318
324
  value: 'Klicken, um mehr zu erfahren',
319
325
  },
326
+ or: {
327
+ value: 'oder',
328
+ },
320
329
  'restricted items': {
321
330
  value: 'eingeschränkte Artikel',
322
331
  },
@@ -11,6 +11,9 @@ export const stringsHebrew = {
11
11
  'Address line 2': {
12
12
  value: 'כתובת שורה 2',
13
13
  },
14
+ 'An unexpected error occurred when processing PayPal order.': {
15
+ value: 'אירעה שגיאה בלתי צפויה בעת עיבוד הזמנת PayPal.',
16
+ },
14
17
  'Are you sure?': {
15
18
  value: 'אתה בטוח?',
16
19
  },
@@ -92,6 +95,9 @@ export const stringsHebrew = {
92
95
  'Expected delivery': {
93
96
  value: 'אספקה צפויה',
94
97
  },
98
+ 'Failed to create PayPal order. Please try again, or consider using an alternative method.': {
99
+ value: 'נכשל ביצירת הזמנת PayPal. אנא נסה שוב, או שקול להשתמש בשיטה חלופית.',
100
+ },
95
101
  Failure: {
96
102
  value: 'כישלון',
97
103
  },
@@ -317,6 +323,9 @@ export const stringsHebrew = {
317
323
  'click to learn more': {
318
324
  value: 'לחץ למידע נוסף',
319
325
  },
326
+ or: {
327
+ value: 'או',
328
+ },
320
329
  'restricted items': {
321
330
  value: 'פריטים מוגבלים',
322
331
  },
@@ -11,6 +11,9 @@ export const stringsIndonesian = {
11
11
  'Address line 2': {
12
12
  value: 'Baris alamat 2',
13
13
  },
14
+ 'An unexpected error occurred when processing PayPal order.': {
15
+ value: 'Terjadi kesalahan tak terduga saat memproses pesanan PayPal.',
16
+ },
14
17
  'Are you sure?': {
15
18
  value: 'Apakah Anda yakin?',
16
19
  },
@@ -92,6 +95,9 @@ export const stringsIndonesian = {
92
95
  'Expected delivery': {
93
96
  value: 'Perkiraan pengiriman',
94
97
  },
98
+ 'Failed to create PayPal order. Please try again, or consider using an alternative method.': {
99
+ value: 'Gagal membuat pesanan PayPal. Silakan coba lagi, atau pertimbangkan menggunakan metode alternatif.',
100
+ },
95
101
  Failure: {
96
102
  value: 'Kegagalan',
97
103
  },
@@ -317,6 +323,9 @@ export const stringsIndonesian = {
317
323
  'click to learn more': {
318
324
  value: 'klik untuk belajar lebih lanjut',
319
325
  },
326
+ or: {
327
+ value: 'atau',
328
+ },
320
329
  'restricted items': {
321
330
  value: 'barang terbatas',
322
331
  },
@@ -11,6 +11,9 @@ export const stringsItalian = {
11
11
  'Address line 2': {
12
12
  value: 'Indirizzo linea 2',
13
13
  },
14
+ 'An unexpected error occurred when processing PayPal order.': {
15
+ value: "Si è verificato un errore imprevisto durante l'elaborazione dell'ordine PayPal.",
16
+ },
14
17
  'Are you sure?': {
15
18
  value: 'Sei sicuro?',
16
19
  },
@@ -92,6 +95,9 @@ export const stringsItalian = {
92
95
  'Expected delivery': {
93
96
  value: 'Consegna prevista',
94
97
  },
98
+ 'Failed to create PayPal order. Please try again, or consider using an alternative method.': {
99
+ value: "Impossibile creare l'ordine PayPal. Per favore, riprova o considera l'uso di un metodo alternativo.",
100
+ },
95
101
  Failure: {
96
102
  value: 'Fallimento',
97
103
  },
@@ -317,6 +323,9 @@ export const stringsItalian = {
317
323
  'click to learn more': {
318
324
  value: 'clicca per saperne di più',
319
325
  },
326
+ or: {
327
+ value: 'o',
328
+ },
320
329
  'restricted items': {
321
330
  value: 'articoli limitati',
322
331
  },
@@ -11,6 +11,9 @@ export const stringsJapanese = {
11
11
  'Address line 2': {
12
12
  value: '住所2',
13
13
  },
14
+ 'An unexpected error occurred when processing PayPal order.': {
15
+ value: 'PayPal注文の処理中に予期しないエラーが発生しました。',
16
+ },
14
17
  'Are you sure?': {
15
18
  value: '本気ですか?',
16
19
  },
@@ -92,6 +95,9 @@ export const stringsJapanese = {
92
95
  'Expected delivery': {
93
96
  value: '配送予定日',
94
97
  },
98
+ 'Failed to create PayPal order. Please try again, or consider using an alternative method.': {
99
+ value: 'PayPal注文の作成に失敗しました。もう一度お試しになるか、別の方法を検討してください。',
100
+ },
95
101
  Failure: {
96
102
  value: '失敗',
97
103
  },
@@ -317,6 +323,9 @@ export const stringsJapanese = {
317
323
  'click to learn more': {
318
324
  value: '詳細を知るにはクリック',
319
325
  },
326
+ or: {
327
+ value: 'または',
328
+ },
320
329
  'restricted items': {
321
330
  value: '制限された項目',
322
331
  },
@@ -11,6 +11,9 @@ export const stringsKorean = {
11
11
  'Address line 2': {
12
12
  value: '주소 2',
13
13
  },
14
+ 'An unexpected error occurred when processing PayPal order.': {
15
+ value: 'PayPal 주문을 처리하는 중에 예기치 않은 오류가 발생했습니다.',
16
+ },
14
17
  'Are you sure?': {
15
18
  value: '확실합니까?',
16
19
  },
@@ -92,6 +95,9 @@ export const stringsKorean = {
92
95
  'Expected delivery': {
93
96
  value: '예상 배송일',
94
97
  },
98
+ 'Failed to create PayPal order. Please try again, or consider using an alternative method.': {
99
+ value: 'PayPal 주문 생성에 실패했습니다. 다시 시도하거나 대체 방법을 고려하십시오.',
100
+ },
95
101
  Failure: {
96
102
  value: '실패',
97
103
  },
@@ -317,6 +323,9 @@ export const stringsKorean = {
317
323
  'click to learn more': {
318
324
  value: '자세히 알아보려면 클릭',
319
325
  },
326
+ or: {
327
+ value: '또는',
328
+ },
320
329
  'restricted items': {
321
330
  value: '제한된 항목',
322
331
  },
@@ -11,6 +11,9 @@ export const stringsNorwegian = {
11
11
  'Address line 2': {
12
12
  value: 'Adresselinje 2',
13
13
  },
14
+ 'An unexpected error occurred when processing PayPal order.': {
15
+ value: 'En uventet feil oppstod ved behandling av PayPal-bestillingen.',
16
+ },
14
17
  'Are you sure?': {
15
18
  value: 'Er du sikker?',
16
19
  },
@@ -92,6 +95,9 @@ export const stringsNorwegian = {
92
95
  'Expected delivery': {
93
96
  value: 'Forventet levering',
94
97
  },
98
+ 'Failed to create PayPal order. Please try again, or consider using an alternative method.': {
99
+ value: 'Kunne ikke opprette PayPal-bestilling. Vennligst prøv igjen, eller vurder å bruke en alternativ metode.',
100
+ },
95
101
  Failure: {
96
102
  value: 'Feil',
97
103
  },
@@ -317,6 +323,9 @@ export const stringsNorwegian = {
317
323
  'click to learn more': {
318
324
  value: 'klikk for å lære mer',
319
325
  },
326
+ or: {
327
+ value: 'eller',
328
+ },
320
329
  'restricted items': {
321
330
  value: 'begrensede elementer',
322
331
  },