@justifi/webcomponents 6.5.0-rc.2 → 6.5.0

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 (546) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/{GooglePay-D3zN44IX.js → Refund-Blquw3jZ.js} +2 -415
  3. package/dist/cjs/bank-account-document-form-inputs_6.cjs.entry.js +7 -8
  4. package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
  5. package/dist/cjs/{business.service-88yKWtbE.js → business.service-DrBmfEbR.js} +1 -1
  6. package/dist/cjs/card-form.cjs.entry.js +2 -2
  7. package/dist/cjs/{check-pkg-version-RW_N0V76.js → check-pkg-version-D06Nzj0h.js} +2 -2
  8. package/dist/cjs/{checkout.service-Cj1RxduX.js → checkout.service-BEU6CI0t.js} +1 -1
  9. package/dist/cjs/checkout.store-BA6h-dp2.js +107 -0
  10. package/dist/cjs/checkouts-list-core.cjs.entry.js +2 -3
  11. package/dist/cjs/custom-popper.cjs.entry.js +2 -2
  12. package/dist/cjs/{dispute.service-AXzLxuOs.js → dispute.service-c0CZxPpe.js} +1 -1
  13. package/dist/cjs/form-alert_5.cjs.entry.js +6 -6
  14. package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
  15. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  16. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
  17. package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +2 -2
  18. package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
  19. package/dist/cjs/form-control-number-masked_3.cjs.entry.js +4 -4
  20. package/dist/cjs/form-control-number.cjs.entry.js +2 -2
  21. package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
  22. package/dist/cjs/form-control-select_3.cjs.entry.js +4 -4
  23. package/dist/cjs/{get-payment-details-DVBTf7h5.js → get-payment-details-D8UQRtX1.js} +2 -2
  24. package/dist/cjs/{get-subaccounts-DuYNs7Ny.js → get-subaccounts-fKcKqvrx.js} +2 -2
  25. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
  26. package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
  27. package/dist/cjs/{index-CajjbB9t.js → index-C2ITzalN.js} +0 -1
  28. package/dist/cjs/index.cjs.js +1 -1
  29. package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +24 -23
  30. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +5 -6
  31. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +11 -12
  32. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +8 -8
  33. package/dist/cjs/{justifi-apple-pay_8.cjs.entry.js → justifi-apple-pay_7.cjs.entry.js} +253 -903
  34. package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +2 -2
  35. package/dist/cjs/justifi-business-details.cjs.entry.js +4 -5
  36. package/dist/cjs/justifi-business-form.cjs.entry.js +4 -5
  37. package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +2 -2
  38. package/dist/cjs/justifi-checkout.cjs.entry.js +15 -14
  39. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +9 -9
  40. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +7 -8
  41. package/dist/cjs/justifi-details.cjs.entry.js +1 -1
  42. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
  43. package/dist/cjs/justifi-dispute-management.cjs.entry.js +5 -6
  44. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +8 -9
  45. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -4
  46. package/dist/cjs/justifi-order-terminals.cjs.entry.js +9 -10
  47. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +6 -7
  48. package/dist/cjs/justifi-payment-details.cjs.entry.js +5 -6
  49. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +1 -1
  50. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +5 -6
  51. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +6 -7
  52. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
  53. package/dist/cjs/justifi-payments-list.cjs.entry.js +6 -7
  54. package/dist/cjs/justifi-payout-details.cjs.entry.js +5 -6
  55. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +6 -7
  56. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
  57. package/dist/cjs/justifi-payouts-list.cjs.entry.js +7 -8
  58. package/dist/cjs/justifi-refund-payment.cjs.entry.js +9 -10
  59. package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
  60. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +8 -7
  61. package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
  62. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +11 -12
  63. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +6 -7
  64. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +7 -8
  65. package/dist/cjs/justifi-terminals-list.cjs.entry.js +7 -8
  66. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +1 -1
  67. package/dist/cjs/loader.cjs.js +1 -1
  68. package/dist/cjs/{package-DCSehIuE.js → package-gCv25hzn.js} +1 -1
  69. package/dist/cjs/pagination-menu.cjs.entry.js +3 -3
  70. package/dist/cjs/payment-details-core.cjs.entry.js +10 -11
  71. package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
  72. package/dist/cjs/{payment.service-7Ayen6ud.js → payment.service-DXbR13Kq.js} +1 -1
  73. package/dist/cjs/payments-list-core.cjs.entry.js +2 -3
  74. package/dist/cjs/payout-details-core.cjs.entry.js +3 -3
  75. package/dist/cjs/{payout.service-6PsVtHcu.js → payout.service-D0U6kzXJ.js} +1 -1
  76. package/dist/cjs/payouts-list-core.cjs.entry.js +2 -3
  77. package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
  78. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +3 -4
  79. package/dist/cjs/{terminal-orders-table-BQXO4z_E.js → terminal-orders-table-BByfBAEK.js} +3 -3
  80. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  81. package/dist/cjs/{terminal.service-DgE2p1j0.js → terminal.service-BqXeiERV.js} +1 -1
  82. package/dist/cjs/terminals-list-core.cjs.entry.js +2 -3
  83. package/dist/cjs/webcomponents.cjs.js +1 -1
  84. package/dist/collection/api/Checkout.js +2 -0
  85. package/dist/collection/api/index.js +0 -2
  86. package/dist/collection/collection-manifest.json +1 -2
  87. package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +6 -7
  88. package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +2 -2
  89. package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +7 -8
  90. package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +6 -7
  91. package/dist/collection/components/business-forms/owner-form/identity-address/identity-address-form.js +1 -1
  92. package/dist/collection/components/business-forms/owner-form/owner-form-core.js +1 -1
  93. package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +7 -8
  94. package/dist/collection/components/business-forms/owner-form/owner-form.js +1 -1
  95. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +1 -1
  96. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-document-inputs.js +1 -1
  97. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs-canada.js +1 -1
  98. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.js +1 -1
  99. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-read-only-value.js +1 -1
  100. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +1 -1
  101. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +1 -1
  102. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +1 -1
  103. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +2 -2
  104. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +1 -1
  105. package/dist/collection/components/business-forms/payment-provisioning/form-address-fields/form-address-fields.js +1 -1
  106. package/dist/collection/components/business-forms/payment-provisioning/form-control-monetary-provisioning.js +2 -2
  107. package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +1 -1
  108. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +1 -1
  109. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-buttons.js +1 -1
  110. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +1 -1
  111. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +1 -1
  112. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +1 -1
  113. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +2 -2
  114. package/dist/collection/components/checkout/card-form/card-form.js +2 -2
  115. package/dist/collection/components/checkout/checkout.js +2 -2
  116. package/dist/collection/components/checkout/save-new-payment-method.js +1 -1
  117. package/dist/collection/components/checkout/saved-payment-method.js +1 -1
  118. package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
  119. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +3 -2
  120. package/dist/collection/components/checkouts-list/checkouts-list.js +1 -1
  121. package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
  122. package/dist/collection/components/dispute-management/dispute-management.js +1 -1
  123. package/dist/collection/components/dispute-management/dispute-notification.js +2 -2
  124. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
  125. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
  126. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
  127. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
  128. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
  129. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
  130. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
  131. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
  132. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
  133. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
  134. package/dist/collection/components/filters/table-filters-menu.js +1 -1
  135. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
  136. package/dist/collection/components/modular-checkout/ModularCheckout.js +0 -1
  137. package/dist/collection/components/modular-checkout/modular-checkout.js +9 -46
  138. package/dist/collection/components/modular-checkout/sub-components/bank-account-billing-form-simple.js +1 -1
  139. package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
  140. package/dist/collection/components/modular-checkout/sub-components/card-billing-form-simple.js +1 -1
  141. package/dist/collection/components/modular-checkout/sub-components/card-form.js +2 -2
  142. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
  143. package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
  144. package/dist/collection/components/order-terminals/order-terminals.js +1 -1
  145. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  146. package/dist/collection/components/payment-details/payment-details-core.js +8 -8
  147. package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +1 -1
  148. package/dist/collection/components/payments-list/payments-list-core.js +1 -1
  149. package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
  150. package/dist/collection/components/payments-list/payments-list.js +1 -1
  151. package/dist/collection/components/payout-details/payout-details-core.js +3 -3
  152. package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +1 -1
  153. package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
  154. package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
  155. package/dist/collection/components/payouts-list/payouts-list.js +1 -1
  156. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
  157. package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
  158. package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +1 -1
  159. package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
  160. package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
  161. package/dist/collection/components/terminals-list/terminals-list.js +1 -1
  162. package/dist/collection/components/tokenize-payment-method/internal-tokenize-payment-method.js +4 -3
  163. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +10 -5
  164. package/dist/collection/store/checkout.store.js +0 -4
  165. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  166. package/dist/collection/ui-components/details/details.js +1 -1
  167. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  168. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  169. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  170. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  171. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  172. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  173. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  174. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  175. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  176. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  177. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  178. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  179. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  180. package/dist/collection/ui-components/pagination-menu/pagination-menu.js +3 -3
  181. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
  182. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
  183. package/dist/collection/ui-components/shadow-dom-components/justifi-radio-list-item.js +1 -1
  184. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
  185. package/dist/docs.json +124 -569
  186. package/dist/esm/{GooglePay-ChLgDgG7.js → Refund-BugCdfRo.js} +3 -405
  187. package/dist/esm/bank-account-document-form-inputs_6.entry.js +7 -8
  188. package/dist/esm/bank-account-form.entry.js +2 -2
  189. package/dist/esm/{business.service-C0JaOBMs.js → business.service-pWcc3kfX.js} +1 -1
  190. package/dist/esm/card-form.entry.js +2 -2
  191. package/dist/esm/{check-pkg-version-D0GWFnyL.js → check-pkg-version-AQP98jzk.js} +2 -2
  192. package/dist/esm/{checkout.service-gxuAcx_d.js → checkout.service-B4xSV2-X.js} +1 -1
  193. package/dist/esm/checkout.store-CaS_htQd.js +101 -0
  194. package/dist/esm/checkouts-list-core.entry.js +2 -3
  195. package/dist/esm/custom-popper.entry.js +2 -2
  196. package/dist/esm/{dispute.service-DmYLDaWO.js → dispute.service-3Kbbh1J9.js} +1 -1
  197. package/dist/esm/form-alert_5.entry.js +6 -6
  198. package/dist/esm/form-control-checkbox.entry.js +2 -2
  199. package/dist/esm/form-control-date.entry.js +2 -2
  200. package/dist/esm/form-control-file-v2_2.entry.js +3 -3
  201. package/dist/esm/form-control-monetary-provisioning.entry.js +2 -2
  202. package/dist/esm/form-control-monetary.entry.js +2 -2
  203. package/dist/esm/form-control-number-masked_3.entry.js +4 -4
  204. package/dist/esm/form-control-number.entry.js +2 -2
  205. package/dist/esm/form-control-radio.entry.js +2 -2
  206. package/dist/esm/form-control-select_3.entry.js +4 -4
  207. package/dist/esm/{get-payment-details-CJ6fHbft.js → get-payment-details-CakzKvOr.js} +1 -1
  208. package/dist/esm/{get-subaccounts-3zYjlgWb.js → get-subaccounts-Cw1Adtmo.js} +1 -1
  209. package/dist/esm/gross-payment-chart-core.entry.js +1 -1
  210. package/dist/esm/hidden-input_2.entry.js +5 -5
  211. package/dist/esm/{index-DkoufM1t.js → index-DCIW8z1f.js} +0 -1
  212. package/dist/esm/index.js +1 -1
  213. package/dist/esm/internal-tokenize-payment-method_7.entry.js +13 -12
  214. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +1 -2
  215. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +11 -12
  216. package/dist/esm/justifi-additional-statement_8.entry.js +8 -8
  217. package/dist/esm/{justifi-apple-pay_8.entry.js → justifi-apple-pay_7.entry.js} +137 -786
  218. package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +2 -2
  219. package/dist/esm/justifi-business-details.entry.js +4 -5
  220. package/dist/esm/justifi-business-form.entry.js +4 -5
  221. package/dist/esm/justifi-business-representative-form-inputs.entry.js +2 -2
  222. package/dist/esm/justifi-checkout.entry.js +8 -7
  223. package/dist/esm/justifi-checkouts-list-filters.entry.js +3 -3
  224. package/dist/esm/justifi-checkouts-list.entry.js +6 -7
  225. package/dist/esm/justifi-details.entry.js +1 -1
  226. package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
  227. package/dist/esm/justifi-dispute-management.entry.js +5 -6
  228. package/dist/esm/justifi-dispute-notification_3.entry.js +8 -9
  229. package/dist/esm/justifi-gross-payment-chart.entry.js +3 -4
  230. package/dist/esm/justifi-order-terminals.entry.js +6 -7
  231. package/dist/esm/justifi-owner-form_3.entry.js +6 -7
  232. package/dist/esm/justifi-payment-details.entry.js +5 -6
  233. package/dist/esm/justifi-payment-provisioning-core.entry.js +1 -1
  234. package/dist/esm/justifi-payment-provisioning.entry.js +5 -6
  235. package/dist/esm/justifi-payment-transactions-list.entry.js +5 -6
  236. package/dist/esm/justifi-payments-list-filters.entry.js +2 -2
  237. package/dist/esm/justifi-payments-list.entry.js +5 -6
  238. package/dist/esm/justifi-payout-details.entry.js +4 -5
  239. package/dist/esm/justifi-payout-transactions-list.entry.js +5 -6
  240. package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
  241. package/dist/esm/justifi-payouts-list.entry.js +6 -7
  242. package/dist/esm/justifi-refund-payment.entry.js +5 -6
  243. package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
  244. package/dist/esm/justifi-season-interruption-insurance.entry.js +5 -4
  245. package/dist/esm/justifi-skeleton.entry.js +1 -1
  246. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +3 -4
  247. package/dist/esm/justifi-terminal-orders-list.entry.js +5 -6
  248. package/dist/esm/justifi-terminals-list-filters.entry.js +2 -3
  249. package/dist/esm/justifi-terminals-list.entry.js +6 -7
  250. package/dist/esm/justifi-tokenize-payment-method.entry.js +1 -1
  251. package/dist/esm/loader.js +1 -1
  252. package/dist/esm/{package-DbqKgrF-.js → package-DQf0KCJj.js} +1 -1
  253. package/dist/esm/pagination-menu.entry.js +3 -3
  254. package/dist/esm/payment-details-core.entry.js +9 -10
  255. package/dist/esm/payment-method-option.entry.js +1 -1
  256. package/dist/esm/{payment.service-CtzbcN40.js → payment.service-nExZY_sU.js} +1 -1
  257. package/dist/esm/payments-list-core.entry.js +2 -3
  258. package/dist/esm/payout-details-core.entry.js +3 -3
  259. package/dist/esm/{payout.service-BSepoyj1.js → payout.service-B9-JQqU6.js} +1 -1
  260. package/dist/esm/payouts-list-core.entry.js +2 -3
  261. package/dist/esm/table-filters-menu.entry.js +1 -1
  262. package/dist/esm/terminal-orders-list-core.entry.js +3 -4
  263. package/dist/esm/{terminal-orders-table-BDQyyZp2.js → terminal-orders-table-DsrpmD9F.js} +1 -1
  264. package/dist/esm/terminal-quantity-selector.entry.js +1 -1
  265. package/dist/esm/{terminal.service-DFPVyp0k.js → terminal.service-DvFiKAKV.js} +1 -1
  266. package/dist/esm/terminals-list-core.entry.js +2 -3
  267. package/dist/esm/webcomponents.js +1 -1
  268. package/dist/module/Analytics.js +0 -2
  269. package/dist/module/ModularCheckout.js +0 -1
  270. package/dist/module/Refund.js +2 -0
  271. package/dist/module/additional-questions.js +2 -2
  272. package/dist/module/additional-statement.js +1 -1
  273. package/dist/module/apple-pay.js +120 -1
  274. package/dist/module/bank-account-billing-form-simple.js +1 -1
  275. package/dist/module/bank-account-document-inputs.js +1 -3
  276. package/dist/module/bank-account-form-inputs-canada2.js +1 -1
  277. package/dist/module/bank-account-form-inputs2.js +1 -1
  278. package/dist/module/bank-account-form.js +2 -2
  279. package/dist/module/bank-account-read-only-value2.js +1 -1
  280. package/dist/module/bank-account.js +2 -2
  281. package/dist/module/business-additional-questions-form-step.js +1 -1
  282. package/dist/module/business-bank-account-form-step-core.js +0 -2
  283. package/dist/module/business-bank-account-form-step.js +1 -3
  284. package/dist/module/business-core-info-form-step.js +1 -1
  285. package/dist/module/business-core-info.js +2 -2
  286. package/dist/module/business-owners-form-step.js +1 -1
  287. package/dist/module/business-representative-form-inputs.js +2 -2
  288. package/dist/module/business-representative-form-step.js +1 -1
  289. package/dist/module/business-representative.js +3 -3
  290. package/dist/module/business-terms-conditions-form-step.js +1 -3
  291. package/dist/module/business.service.js +0 -2
  292. package/dist/module/cancellation-policy.js +1 -1
  293. package/dist/module/card-billing-form-simple.js +1 -1
  294. package/dist/module/card-form.js +2 -2
  295. package/dist/module/card-form2.js +2 -2
  296. package/dist/module/checkout.service.js +0 -2
  297. package/dist/module/checkout.store.js +0 -4
  298. package/dist/module/checkouts-list-core2.js +1 -3
  299. package/dist/module/custom-popper2.js +2 -2
  300. package/dist/module/customer-details.js +1 -1
  301. package/dist/module/details.js +1 -1
  302. package/dist/module/dispute-management-core.js +1 -1
  303. package/dist/module/dispute-notification.js +2 -2
  304. package/dist/module/dispute-response-actions.js +0 -2
  305. package/dist/module/dispute-response-core.js +1 -1
  306. package/dist/module/dispute-response.js +1 -1
  307. package/dist/module/duplicate-charge.js +1 -1
  308. package/dist/module/electronic-evidence.js +1 -1
  309. package/dist/module/form-address-fields.js +1 -1
  310. package/dist/module/form-control-checkbox2.js +2 -2
  311. package/dist/module/form-control-date2.js +2 -2
  312. package/dist/module/form-control-file-v22.js +1 -1
  313. package/dist/module/form-control-file2.js +2 -2
  314. package/dist/module/form-control-monetary-provisioning2.js +2 -2
  315. package/dist/module/form-control-monetary2.js +2 -2
  316. package/dist/module/form-control-number-masked2.js +2 -2
  317. package/dist/module/form-control-number.js +2 -2
  318. package/dist/module/form-control-radio2.js +2 -2
  319. package/dist/module/form-control-select2.js +2 -2
  320. package/dist/module/form-control-text2.js +2 -2
  321. package/dist/module/form-control-textarea2.js +2 -2
  322. package/dist/module/get-payment-details.js +0 -2
  323. package/dist/module/get-subaccounts.js +0 -2
  324. package/dist/module/gross-payment-chart-core2.js +1 -1
  325. package/dist/module/hidden-input2.js +1 -1
  326. package/dist/module/identity-address-form.js +1 -1
  327. package/dist/module/iframe-input2.js +3 -3
  328. package/dist/module/internal-tokenize-payment-method2.js +1 -3
  329. package/dist/module/justifi-business-form.js +0 -2
  330. package/dist/module/justifi-button2.js +1 -1
  331. package/dist/module/justifi-checkout.js +40 -46
  332. package/dist/module/justifi-checkouts-list-filters.js +2 -3
  333. package/dist/module/justifi-checkouts-list.js +1 -3
  334. package/dist/module/justifi-dispute-management.js +1 -1
  335. package/dist/module/justifi-gross-payment-chart.js +0 -2
  336. package/dist/module/justifi-header2.js +1 -1
  337. package/dist/module/justifi-order-terminals.js +1 -3
  338. package/dist/module/justifi-payment-provisioning.js +1 -3
  339. package/dist/module/justifi-payment-transactions-list.js +1 -3
  340. package/dist/module/justifi-payments-list-filters.js +2 -2
  341. package/dist/module/justifi-payments-list.js +1 -3
  342. package/dist/module/justifi-payout-details.js +0 -2
  343. package/dist/module/justifi-payout-transactions-list.js +1 -3
  344. package/dist/module/justifi-payouts-list-filters.js +2 -2
  345. package/dist/module/justifi-payouts-list.js +1 -3
  346. package/dist/module/justifi-radio-list-item2.js +1 -1
  347. package/dist/module/justifi-refund-payment.js +0 -2
  348. package/dist/module/justifi-saved-payment-method.js +1 -1
  349. package/dist/module/justifi-season-interruption-insurance.js +0 -2
  350. package/dist/module/justifi-skeleton.js +1 -1
  351. package/dist/module/justifi-terminal-orders-list-filters.js +2 -4
  352. package/dist/module/justifi-terminal-orders-list.js +1 -3
  353. package/dist/module/justifi-terminals-list-filters.js +1 -3
  354. package/dist/module/justifi-terminals-list.js +1 -3
  355. package/dist/module/justifi-tokenize-payment-method.js +1 -1
  356. package/dist/module/legal-address-form-step.js +1 -1
  357. package/dist/module/legal-address-form.js +2 -2
  358. package/dist/module/modular-checkout.js +6 -46
  359. package/dist/module/owner-form-core2.js +1 -1
  360. package/dist/module/owner-form-inputs2.js +3 -3
  361. package/dist/module/owner-form.js +1 -1
  362. package/dist/module/package.js +1 -1
  363. package/dist/module/pagination-menu2.js +3 -3
  364. package/dist/module/payment-details-core2.js +8 -10
  365. package/dist/module/payment-method-option.js +1 -1
  366. package/dist/module/payment-provisioning-core.js +1 -1
  367. package/dist/module/payment-provisioning-form-buttons.js +1 -1
  368. package/dist/module/payment-provisioning-form-steps.js +1 -1
  369. package/dist/module/payment.service.js +0 -2
  370. package/dist/module/payments-list-core2.js +1 -3
  371. package/dist/module/payout-details-core2.js +3 -3
  372. package/dist/module/payout.service.js +0 -2
  373. package/dist/module/payouts-list-core2.js +1 -3
  374. package/dist/module/plaid.service.js +0 -2
  375. package/dist/module/product-or-service.js +1 -1
  376. package/dist/module/refund-policy.js +1 -1
  377. package/dist/module/save-new-payment-method.js +1 -1
  378. package/dist/module/shipping-details.js +1 -1
  379. package/dist/module/summary.js +1 -1
  380. package/dist/module/table-filters-menu2.js +1 -1
  381. package/dist/module/terminal-orders-list-core2.js +1 -3
  382. package/dist/module/terminal-quantity-selector2.js +1 -1
  383. package/dist/module/terminal.service.js +0 -2
  384. package/dist/module/terminals-list-core2.js +1 -3
  385. package/dist/types/api/Checkout.d.ts +3 -3
  386. package/dist/types/api/index.d.ts +0 -2
  387. package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +3 -3
  388. package/dist/types/components/checkout/checkout.d.ts +0 -1
  389. package/dist/types/components/modular-checkout/ModularCheckout.d.ts +1 -2
  390. package/dist/types/components/modular-checkout/modular-checkout.d.ts +0 -5
  391. package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +1 -1
  392. package/dist/types/components.d.ts +22 -160
  393. package/dist/types/store/checkout.store.d.ts +0 -1
  394. package/dist/webcomponents/index.esm.js +1 -1
  395. package/dist/webcomponents/{p-a22d1078.entry.js → p-0082f428.entry.js} +1 -1
  396. package/dist/webcomponents/{p-19dabeab.entry.js → p-1193a1ac.entry.js} +1 -1
  397. package/dist/webcomponents/p-159d8ae7.entry.js +1 -0
  398. package/dist/webcomponents/{p-86111a0a.entry.js → p-1edec396.entry.js} +1 -1
  399. package/dist/webcomponents/p-20a8b0c0.entry.js +1 -0
  400. package/dist/webcomponents/p-22f74666.entry.js +1 -0
  401. package/dist/webcomponents/p-25b382b8.entry.js +1 -0
  402. package/dist/webcomponents/{p-e6507b93.entry.js → p-2769f945.entry.js} +1 -1
  403. package/dist/webcomponents/p-30f61f44.entry.js +1 -0
  404. package/dist/webcomponents/p-3437ce38.entry.js +1 -0
  405. package/dist/webcomponents/p-34aa9298.entry.js +1 -0
  406. package/dist/webcomponents/p-36720116.entry.js +1 -0
  407. package/dist/webcomponents/p-39706e38.entry.js +1 -0
  408. package/dist/webcomponents/p-3c38cec5.entry.js +1 -0
  409. package/dist/webcomponents/p-42d756b8.entry.js +1 -0
  410. package/dist/webcomponents/p-44a94dac.entry.js +1 -0
  411. package/dist/webcomponents/p-45936490.entry.js +1 -0
  412. package/dist/webcomponents/p-4761e0aa.entry.js +1 -0
  413. package/dist/webcomponents/p-4baabba0.entry.js +1 -0
  414. package/dist/webcomponents/p-4dcbc0af.entry.js +1 -0
  415. package/dist/webcomponents/{p-f2650bfc.entry.js → p-4e23116c.entry.js} +1 -1
  416. package/dist/webcomponents/p-54ff9b59.entry.js +1 -0
  417. package/dist/webcomponents/{p-3bacf834.entry.js → p-58ae4f9e.entry.js} +1 -1
  418. package/dist/webcomponents/p-5c8c88c6.entry.js +1 -0
  419. package/dist/webcomponents/p-66688508.entry.js +1 -0
  420. package/dist/webcomponents/p-7218c312.entry.js +1 -0
  421. package/dist/webcomponents/p-77b76007.entry.js +1 -0
  422. package/dist/webcomponents/p-77bd4fb0.entry.js +1 -0
  423. package/dist/webcomponents/p-79d77eb9.entry.js +1 -0
  424. package/dist/webcomponents/p-7ee0bae1.entry.js +1 -0
  425. package/dist/webcomponents/{p-270bf699.entry.js → p-800660f2.entry.js} +1 -1
  426. package/dist/webcomponents/p-80f5b2c8.entry.js +1 -0
  427. package/dist/webcomponents/p-84e2bd93.entry.js +1 -0
  428. package/dist/webcomponents/{p-aaed4997.entry.js → p-8681f258.entry.js} +1 -1
  429. package/dist/webcomponents/p-89518b26.entry.js +1 -0
  430. package/dist/webcomponents/p-8b944d09.entry.js +1 -0
  431. package/dist/webcomponents/p-942c8949.entry.js +1 -0
  432. package/dist/webcomponents/p-98b8028e.entry.js +1 -0
  433. package/dist/webcomponents/p-9e1f4231.entry.js +1 -0
  434. package/dist/webcomponents/{p-fe862786.entry.js → p-9f70ce93.entry.js} +1 -1
  435. package/dist/webcomponents/{p-B-9GGR7s.js → p-B4ZUYyNh.js} +1 -1
  436. package/dist/webcomponents/{p-DjhbNep7.js → p-BCPutgAi.js} +1 -1
  437. package/dist/webcomponents/{p-Ds2u5A8P.js → p-BojLBYsY.js} +1 -1
  438. package/dist/webcomponents/p-BpaE8q5f.js +1 -0
  439. package/dist/webcomponents/{p-ByJiG6HY.js → p-C8QOezo8.js} +1 -1
  440. package/dist/webcomponents/{p-E0ZPuuI7.js → p-CFevTCAJ.js} +1 -1
  441. package/dist/webcomponents/p-CPtsjcdm.js +1 -0
  442. package/dist/webcomponents/p-Ch9cTPyq.js +1 -0
  443. package/dist/webcomponents/p-DCIW8z1f.js +1 -0
  444. package/dist/webcomponents/p-DQf0KCJj.js +1 -0
  445. package/dist/webcomponents/p-DU8dqq9U.js +1 -0
  446. package/dist/webcomponents/{p-7SgMy3r5.js → p-D_IJC4HG.js} +1 -1
  447. package/dist/webcomponents/{p-C6kJ3uRN.js → p-LeyS3YJV.js} +1 -1
  448. package/dist/webcomponents/{p-DELUWNSY.js → p-MQxr_LMC.js} +1 -1
  449. package/dist/webcomponents/p-a4540205.entry.js +1 -0
  450. package/dist/webcomponents/p-a655b996.entry.js +1 -0
  451. package/dist/webcomponents/p-ad5e488a.entry.js +1 -0
  452. package/dist/webcomponents/{p-03c8c754.entry.js → p-aec9185f.entry.js} +1 -1
  453. package/dist/webcomponents/p-af236d05.entry.js +1 -0
  454. package/dist/webcomponents/{p-4e71de94.entry.js → p-af48a6bb.entry.js} +1 -1
  455. package/dist/webcomponents/p-af4e501d.entry.js +1 -0
  456. package/dist/webcomponents/p-b0e80802.entry.js +1 -0
  457. package/dist/webcomponents/p-b4d8a3f6.entry.js +1 -0
  458. package/dist/webcomponents/p-bf8cf72d.entry.js +1 -0
  459. package/dist/webcomponents/p-c3b71a1f.entry.js +1 -0
  460. package/dist/webcomponents/p-d2d69454.entry.js +1 -0
  461. package/dist/webcomponents/p-da26e869.entry.js +1 -0
  462. package/dist/webcomponents/p-daa534f1.entry.js +1 -0
  463. package/dist/webcomponents/p-dc0d3484.entry.js +1 -0
  464. package/dist/webcomponents/{p-48d1bc83.entry.js → p-e2e6c201.entry.js} +1 -1
  465. package/dist/webcomponents/p-e91af879.entry.js +1 -0
  466. package/dist/webcomponents/p-eb56ba9b.entry.js +1 -0
  467. package/dist/webcomponents/p-ed006dd6.entry.js +1 -0
  468. package/dist/webcomponents/{p-e7e5fee9.entry.js → p-ed55d333.entry.js} +1 -1
  469. package/dist/webcomponents/p-edcb84bf.entry.js +1 -0
  470. package/dist/webcomponents/p-efb2a58a.entry.js +1 -0
  471. package/dist/webcomponents/{p-bbc42ab9.entry.js → p-f6ea74db.entry.js} +1 -1
  472. package/dist/webcomponents/p-f91b79fb.entry.js +1 -0
  473. package/dist/webcomponents/p-fab28b02.entry.js +1 -0
  474. package/dist/webcomponents/webcomponents.esm.js +1 -1
  475. package/package.json +13 -13
  476. package/dist/collection/api/GooglePay.js +0 -181
  477. package/dist/collection/api/services/google-pay.service.js +0 -240
  478. package/dist/collection/components/modular-checkout/sub-components/google-pay-skeleton.js +0 -10
  479. package/dist/collection/components/modular-checkout/sub-components/google-pay.js +0 -609
  480. package/dist/collection/ui-components/google-pay-button.js +0 -255
  481. package/dist/module/ApplePay.js +0 -121
  482. package/dist/module/GooglePay.js +0 -184
  483. package/dist/module/google-pay.js +0 -785
  484. package/dist/module/justifi-google-pay.d.ts +0 -11
  485. package/dist/module/justifi-google-pay.js +0 -6
  486. package/dist/types/api/GooglePay.d.ts +0 -271
  487. package/dist/types/api/services/google-pay.service.d.ts +0 -60
  488. package/dist/types/components/modular-checkout/sub-components/google-pay-skeleton.d.ts +0 -6
  489. package/dist/types/components/modular-checkout/sub-components/google-pay.d.ts +0 -59
  490. package/dist/types/ui-components/google-pay-button.d.ts +0 -18
  491. package/dist/webcomponents/p-0772719b.entry.js +0 -1
  492. package/dist/webcomponents/p-10df10cb.entry.js +0 -1
  493. package/dist/webcomponents/p-1120699e.entry.js +0 -1
  494. package/dist/webcomponents/p-136b29e3.entry.js +0 -1
  495. package/dist/webcomponents/p-19f44a6d.entry.js +0 -1
  496. package/dist/webcomponents/p-1a9311e3.entry.js +0 -1
  497. package/dist/webcomponents/p-1afcfafd.entry.js +0 -1
  498. package/dist/webcomponents/p-1ceb7363.entry.js +0 -1
  499. package/dist/webcomponents/p-1f196690.entry.js +0 -1
  500. package/dist/webcomponents/p-2da4e6ca.entry.js +0 -1
  501. package/dist/webcomponents/p-2eb123a3.entry.js +0 -1
  502. package/dist/webcomponents/p-36ad1db9.entry.js +0 -1
  503. package/dist/webcomponents/p-38626adf.entry.js +0 -1
  504. package/dist/webcomponents/p-3868f396.entry.js +0 -1
  505. package/dist/webcomponents/p-3ac5ab7e.entry.js +0 -1
  506. package/dist/webcomponents/p-3ad906c1.entry.js +0 -1
  507. package/dist/webcomponents/p-3ae12b98.entry.js +0 -1
  508. package/dist/webcomponents/p-4f102cfd.entry.js +0 -1
  509. package/dist/webcomponents/p-4f82561b.entry.js +0 -1
  510. package/dist/webcomponents/p-51ae205c.entry.js +0 -1
  511. package/dist/webcomponents/p-583a1f08.entry.js +0 -1
  512. package/dist/webcomponents/p-59fb033b.entry.js +0 -1
  513. package/dist/webcomponents/p-5ba28ff0.entry.js +0 -1
  514. package/dist/webcomponents/p-6794a435.entry.js +0 -1
  515. package/dist/webcomponents/p-797be4be.entry.js +0 -1
  516. package/dist/webcomponents/p-81c1ebd3.entry.js +0 -1
  517. package/dist/webcomponents/p-8b6b7e20.entry.js +0 -1
  518. package/dist/webcomponents/p-8fcd277c.entry.js +0 -1
  519. package/dist/webcomponents/p-90744983.entry.js +0 -1
  520. package/dist/webcomponents/p-914b590d.entry.js +0 -1
  521. package/dist/webcomponents/p-Boe55CYS.js +0 -1
  522. package/dist/webcomponents/p-BusXmwDe.js +0 -1
  523. package/dist/webcomponents/p-CQsNLuzi.js +0 -1
  524. package/dist/webcomponents/p-DbqKgrF-.js +0 -1
  525. package/dist/webcomponents/p-DkoufM1t.js +0 -1
  526. package/dist/webcomponents/p-a020c889.entry.js +0 -1
  527. package/dist/webcomponents/p-a6e816f6.entry.js +0 -1
  528. package/dist/webcomponents/p-ad9307c1.entry.js +0 -1
  529. package/dist/webcomponents/p-b36d9885.entry.js +0 -1
  530. package/dist/webcomponents/p-b46223fa.entry.js +0 -1
  531. package/dist/webcomponents/p-ba76226e.entry.js +0 -1
  532. package/dist/webcomponents/p-bc510a8a.entry.js +0 -1
  533. package/dist/webcomponents/p-be3caaf8.entry.js +0 -1
  534. package/dist/webcomponents/p-c11f5079.entry.js +0 -1
  535. package/dist/webcomponents/p-c41191e7.entry.js +0 -1
  536. package/dist/webcomponents/p-c621e7af.entry.js +0 -1
  537. package/dist/webcomponents/p-d13edf9f.entry.js +0 -1
  538. package/dist/webcomponents/p-d4503c9a.entry.js +0 -1
  539. package/dist/webcomponents/p-d913cb6b.entry.js +0 -1
  540. package/dist/webcomponents/p-e016bb2e.entry.js +0 -1
  541. package/dist/webcomponents/p-f42c68b0.entry.js +0 -1
  542. package/dist/webcomponents/p-f4cb581f.entry.js +0 -1
  543. package/dist/webcomponents/p-f528da70.entry.js +0 -1
  544. package/dist/webcomponents/p-f632894a.entry.js +0 -1
  545. package/dist/webcomponents/p-f66de935.entry.js +0 -1
  546. package/dist/webcomponents/p-fc9d0344.entry.js +0 -1
@@ -2,28 +2,149 @@
2
2
 
3
3
  var index = require('./index-BhI7cJcE.js');
4
4
  var Api = require('./Api-BeSnjEuW.js');
5
- var GooglePay$1 = require('./GooglePay-D3zN44IX.js');
6
5
  var styledHost = require('./styled-host-D5g7INLE.js');
7
6
  require('./event-types-YOY5TKUN.js');
8
7
  var skeleton = require('./skeleton-BF3HGL9X.js');
8
+ var checkout_store = require('./checkout.store-BA6h-dp2.js');
9
9
  var parts = require('./parts-Pb06tUMp.js');
10
10
  var utils = require('./utils-Bab-tddY.js');
11
- var index$1 = require('./index-CajjbB9t.js');
12
11
  var header1 = require('./header-1-CBO8uDuZ.js');
13
12
  var insuranceState = require('./insurance-state-BMHITXoD.js');
14
13
  var header3 = require('./header-3-CPWtI1t0.js');
15
- var checkPkgVersion = require('./check-pkg-version-RW_N0V76.js');
14
+ var checkPkgVersion = require('./check-pkg-version-D06Nzj0h.js');
16
15
  require('./config-state-CYoBVAca.js');
17
16
  require('./dinero-BwNN_k7x.js');
18
17
  var ComponentError = require('./ComponentError-D4OLnOkg.js');
18
+ var Refund = require('./Refund-Blquw3jZ.js');
19
19
  require('./Pagination-Dediz133.js');
20
20
  require('./Business-DWHy_-z9.js');
21
21
  require('./Dispute-CruQTF6_.js');
22
22
  var utils$1 = require('./utils-DvUQQLmR.js');
23
- var checkout_service = require('./checkout.service-Cj1RxduX.js');
23
+ var checkout_service = require('./checkout.service-BEU6CI0t.js');
24
+ var index$1 = require('./index-C2ITzalN.js');
24
25
  var paymentMethodOptionUtils = require('./payment-method-option-utils-WYHIHy-l.js');
25
26
  require('./index-mmd0OhmD.js');
26
- require('./package-DCSehIuE.js');
27
+ require('./package-gCv25hzn.js');
28
+
29
+ var ApplePaySessionStatus;
30
+ (function (ApplePaySessionStatus) {
31
+ ApplePaySessionStatus["STATUS_SUCCESS"] = "STATUS_SUCCESS";
32
+ ApplePaySessionStatus["STATUS_FAILURE"] = "STATUS_FAILURE";
33
+ })(ApplePaySessionStatus || (ApplePaySessionStatus = {}));
34
+ var ApplePayButtonType;
35
+ (function (ApplePayButtonType) {
36
+ ApplePayButtonType["PLAIN"] = "plain";
37
+ ApplePayButtonType["BUY"] = "buy";
38
+ ApplePayButtonType["SET_UP"] = "set-up";
39
+ ApplePayButtonType["DONATE"] = "donate";
40
+ ApplePayButtonType["CHECK_OUT"] = "check-out";
41
+ ApplePayButtonType["BOOK"] = "book";
42
+ ApplePayButtonType["SUBSCRIBE"] = "subscribe";
43
+ })(ApplePayButtonType || (ApplePayButtonType = {}));
44
+ var ApplePayButtonStyle;
45
+ (function (ApplePayButtonStyle) {
46
+ ApplePayButtonStyle["BLACK"] = "black";
47
+ ApplePayButtonStyle["WHITE"] = "white";
48
+ ApplePayButtonStyle["WHITE_OUTLINE"] = "white-outline";
49
+ })(ApplePayButtonStyle || (ApplePayButtonStyle = {}));
50
+ var ApplePayMerchantCapability;
51
+ (function (ApplePayMerchantCapability) {
52
+ ApplePayMerchantCapability["SUPPORTS_3DS"] = "supports3DS";
53
+ ApplePayMerchantCapability["SUPPORTS_EMV"] = "supportsEMV";
54
+ ApplePayMerchantCapability["SUPPORTS_CREDIT"] = "supportsCredit";
55
+ ApplePayMerchantCapability["SUPPORTS_DEBIT"] = "supportsDebit";
56
+ })(ApplePayMerchantCapability || (ApplePayMerchantCapability = {}));
57
+ class ApplePayConfig {
58
+ constructor(data) {
59
+ this.merchantIdentifier = data.merchantIdentifier;
60
+ this.displayName = data.displayName;
61
+ this.initiative = data.initiative;
62
+ this.initiativeContext = data.initiativeContext;
63
+ this.buttonType = data.buttonType || ApplePayButtonType.PLAIN;
64
+ this.buttonStyle = data.buttonStyle || ApplePayButtonStyle.BLACK;
65
+ this.buttonLocale = data.buttonLocale || 'en-US';
66
+ }
67
+ get isValid() {
68
+ return !!(this.merchantIdentifier &&
69
+ this.displayName &&
70
+ this.initiative &&
71
+ this.initiativeContext);
72
+ }
73
+ }
74
+ class ApplePayPaymentRequest {
75
+ constructor(data) {
76
+ this.countryCode = data.countryCode;
77
+ this.currencyCode = data.currencyCode;
78
+ this.merchantCapabilities = data.merchantCapabilities;
79
+ this.supportedNetworks = data.supportedNetworks;
80
+ this.total = data.total;
81
+ this.lineItems = data.lineItems;
82
+ this.shippingMethods = data.shippingMethods;
83
+ this.applicationData = data.applicationData;
84
+ this.supportedCountries = data.supportedCountries;
85
+ }
86
+ get isValid() {
87
+ var _a, _b, _c, _d;
88
+ return !!(this.countryCode &&
89
+ this.currencyCode &&
90
+ ((_a = this.merchantCapabilities) === null || _a === void 0 ? void 0 : _a.length) &&
91
+ ((_b = this.supportedNetworks) === null || _b === void 0 ? void 0 : _b.length) &&
92
+ ((_c = this.total) === null || _c === void 0 ? void 0 : _c.label) &&
93
+ ((_d = this.total) === null || _d === void 0 ? void 0 : _d.amount));
94
+ }
95
+ }
96
+ class ApplePayHelpers {
97
+ static isApplePaySupported() {
98
+ var _a;
99
+ return (typeof window !== 'undefined' &&
100
+ 'ApplePaySession' in window &&
101
+ ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.supportsVersion(3)));
102
+ }
103
+ static canMakePayments() {
104
+ var _a;
105
+ if (!this.isApplePaySupported()) {
106
+ return false;
107
+ }
108
+ return ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePayments()) || false;
109
+ }
110
+ static async canMakePaymentsWithActiveCard(merchantIdentifier) {
111
+ var _a;
112
+ if (!this.isApplePaySupported()) {
113
+ return false;
114
+ }
115
+ try {
116
+ return ((await ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePaymentsWithActiveCard(merchantIdentifier))) || false);
117
+ }
118
+ catch (error) {
119
+ console.error('Error checking Apple Pay active card:', error);
120
+ return false;
121
+ }
122
+ }
123
+ static formatAmount(amount) {
124
+ return (amount / 100).toFixed(2);
125
+ }
126
+ static parseAmount(amount) {
127
+ return Math.round(parseFloat(amount) * 100);
128
+ }
129
+ static createLineItem(label, amount, type = 'final') {
130
+ return {
131
+ label,
132
+ amount: this.formatAmount(amount),
133
+ type,
134
+ };
135
+ }
136
+ static getDefaultSupportedNetworks() {
137
+ return ['amex', 'discover', 'masterCard', 'visa'];
138
+ }
139
+ static getDefaultMerchantCapabilities() {
140
+ return [
141
+ ApplePayMerchantCapability.SUPPORTS_3DS,
142
+ ApplePayMerchantCapability.SUPPORTS_EMV,
143
+ ApplePayMerchantCapability.SUPPORTS_CREDIT,
144
+ ApplePayMerchantCapability.SUPPORTS_DEBIT,
145
+ ];
146
+ }
147
+ }
27
148
 
28
149
  // Centralized error codes for Apple Pay service
29
150
  var ApplePayServiceErrorCode;
@@ -42,7 +163,7 @@ class ApplePayService {
42
163
  * Initialize Apple Pay configuration
43
164
  */
44
165
  initialize(applePayConfig) {
45
- this.applePayConfig = new GooglePay$1.ApplePayConfig(applePayConfig);
166
+ this.applePayConfig = new ApplePayConfig(applePayConfig);
46
167
  if (!this.applePayConfig.isValid) {
47
168
  throw new Error('Invalid Apple Pay configuration provided');
48
169
  }
@@ -93,7 +214,7 @@ class ApplePayService {
93
214
  * Check if Apple Pay is available on this device/browser
94
215
  */
95
216
  isAvailable() {
96
- return (GooglePay$1.ApplePayHelpers.isApplePaySupported() && GooglePay$1.ApplePayHelpers.canMakePayments());
217
+ return (ApplePayHelpers.isApplePaySupported() && ApplePayHelpers.canMakePayments());
97
218
  }
98
219
  /**
99
220
  * Check if the user has an active card for the merchant
@@ -102,7 +223,7 @@ class ApplePayService {
102
223
  if (!this.applePayConfig) {
103
224
  throw new Error('Apple Pay not initialized. Call initialize() first.');
104
225
  }
105
- return await GooglePay$1.ApplePayHelpers.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier);
226
+ return await ApplePayHelpers.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier);
106
227
  }
107
228
  /**
108
229
  * Start Apple Pay session
@@ -116,7 +237,7 @@ class ApplePayService {
116
237
  // if (!this.isAvailable()) {
117
238
  // throw new Error('Apple Pay is not available on this device/browser');
118
239
  // }
119
- const request = new GooglePay$1.ApplePayPaymentRequest(paymentRequest);
240
+ const request = new ApplePayPaymentRequest(paymentRequest);
120
241
  if (!request.isValid) {
121
242
  const missingFields = [];
122
243
  if (!request.countryCode)
@@ -227,13 +348,13 @@ class ApplePayService {
227
348
  const payment = event.payment;
228
349
  const paymentPayload = Object.assign(Object.assign({}, payment.token), { product_details: {
229
350
  name: this.currentPaymentRequest.total.label,
230
- price: GooglePay$1.ApplePayHelpers.parseAmount(this.currentPaymentRequest.total.amount),
351
+ price: ApplePayHelpers.parseAmount(this.currentPaymentRequest.total.amount),
231
352
  description: this.currentPaymentRequest.total.label,
232
353
  } });
233
354
  const paymentResult = await this.processPayment(authToken, accountId, paymentPayload);
234
355
  if (paymentResult.success) {
235
356
  this.currentSession.completePayment({
236
- status: GooglePay$1.ApplePaySessionStatus.STATUS_SUCCESS,
357
+ status: ApplePaySessionStatus.STATUS_SUCCESS,
237
358
  });
238
359
  resolve({
239
360
  success: true,
@@ -244,7 +365,7 @@ class ApplePayService {
244
365
  else {
245
366
  console.error('PSP reported payment failure:', paymentResult.data);
246
367
  this.currentSession.completePayment({
247
- status: GooglePay$1.ApplePaySessionStatus.STATUS_FAILURE,
368
+ status: ApplePaySessionStatus.STATUS_FAILURE,
248
369
  });
249
370
  reject({
250
371
  success: false,
@@ -262,7 +383,7 @@ class ApplePayService {
262
383
  console.error('Error stack:', error.stack);
263
384
  }
264
385
  this.currentSession.completePayment({
265
- status: GooglePay$1.ApplePaySessionStatus.STATUS_FAILURE,
386
+ status: ApplePaySessionStatus.STATUS_FAILURE,
266
387
  });
267
388
  reject({
268
389
  success: false,
@@ -294,7 +415,7 @@ class ApplePayService {
294
415
  };
295
416
  this.currentSession.onshippingmethodselected = () => {
296
417
  this.currentSession.completeShippingMethodSelection({
297
- status: GooglePay$1.ApplePaySessionStatus.STATUS_SUCCESS,
418
+ status: ApplePaySessionStatus.STATUS_SUCCESS,
298
419
  newTotal: this.currentPaymentRequest.total,
299
420
  newLineItems: this.currentPaymentRequest.lineItems || [],
300
421
  });
@@ -354,9 +475,9 @@ class ApplePayService {
354
475
  return {
355
476
  countryCode,
356
477
  currencyCode,
357
- merchantCapabilities: GooglePay$1.ApplePayHelpers.getDefaultMerchantCapabilities(),
358
- supportedNetworks: GooglePay$1.ApplePayHelpers.getDefaultSupportedNetworks(),
359
- total: GooglePay$1.ApplePayHelpers.createLineItem(label, amount),
478
+ merchantCapabilities: ApplePayHelpers.getDefaultMerchantCapabilities(),
479
+ supportedNetworks: ApplePayHelpers.getDefaultSupportedNetworks(),
480
+ total: ApplePayHelpers.createLineItem(label, amount),
360
481
  };
361
482
  }
362
483
  /**
@@ -375,30 +496,30 @@ const ApplePaySkeleton = (props) => {
375
496
  return (index.h("div", { class: 'container-fluid p-0' }, index.h("div", { class: 'row mb-3' }, index.h("div", { class: 'col-12 align-content-center' }, index.h(skeleton.Skeleton, { height: '44px', width: '100%', styles: { borderRadius: "8px" } })))));
376
497
  };
377
498
 
378
- const ProcessingSpinner$1 = () => (index.h("div", { class: 'processing-overlay' }, index.h("div", { class: 'spinner' }), index.h("span", null, "Processing...")));
499
+ const ProcessingSpinner = () => (index.h("div", { class: 'processing-overlay' }, index.h("div", { class: 'spinner' }), index.h("span", null, "Processing...")));
379
500
  const ApplePayButton = (props) => {
380
501
  const getApplePayButtonClass = () => {
381
502
  let classes = "apple-pay-button";
382
503
  switch (props.buttonStyle) {
383
- case GooglePay$1.ApplePayButtonStyle.WHITE:
504
+ case ApplePayButtonStyle.WHITE:
384
505
  classes += " apple-pay-button-white";
385
506
  break;
386
- case GooglePay$1.ApplePayButtonStyle.WHITE_OUTLINE:
507
+ case ApplePayButtonStyle.WHITE_OUTLINE:
387
508
  classes += " apple-pay-button-white-outline";
388
509
  break;
389
- case GooglePay$1.ApplePayButtonStyle.BLACK:
510
+ case ApplePayButtonStyle.BLACK:
390
511
  default:
391
512
  classes += " apple-pay-button-black";
392
513
  break;
393
514
  }
394
515
  switch (props.buttonType) {
395
- case GooglePay$1.ApplePayButtonType.BUY:
516
+ case ApplePayButtonType.BUY:
396
517
  classes += " apple-pay-button-type-buy";
397
518
  break;
398
- case GooglePay$1.ApplePayButtonType.DONATE:
519
+ case ApplePayButtonType.DONATE:
399
520
  classes += " apple-pay-button-type-donate";
400
521
  break;
401
- case GooglePay$1.ApplePayButtonType.PLAIN:
522
+ case ApplePayButtonType.PLAIN:
402
523
  default:
403
524
  classes += " apple-pay-button-type-plain";
404
525
  break;
@@ -419,7 +540,7 @@ const ApplePayButton = (props) => {
419
540
  return (index.h("div", { class: 'apple-pay-button-container' }, index.h("button", Object.assign({ class: getApplePayButtonClass(), style: {
420
541
  width: props.width,
421
542
  height: props.height,
422
- }, onClick: handleClick, disabled: props.disabled || props.isProcessing || !props.isAvailable, "aria-label": 'Pay with Apple Pay', type: 'button' }, props), props.isProcessing && ProcessingSpinner$1()), index.h("style", null, `
543
+ }, onClick: handleClick, disabled: props.disabled || props.isProcessing || !props.isAvailable, "aria-label": 'Pay with Apple Pay', type: 'button' }, props), props.isProcessing && ProcessingSpinner()), index.h("style", null, `
423
544
  .apple-pay-button-container {
424
545
  display: block;
425
546
  position: relative;
@@ -529,8 +650,8 @@ const ApplePay = class {
529
650
  this.merchantIdentifier = "merchant.com.staging-justifi.checkout-dev";
530
651
  this.merchantDisplayName = "JustiFi Checkout";
531
652
  this.initiativeContext = "dev-checkout.justifi-staging.com";
532
- this.buttonType = GooglePay$1.ApplePayButtonType.PLAIN;
533
- this.buttonStyle = GooglePay$1.ApplePayButtonStyle.BLACK;
653
+ this.buttonType = ApplePayButtonType.PLAIN;
654
+ this.buttonStyle = ApplePayButtonStyle.BLACK;
534
655
  this.disabled = false;
535
656
  this.showSkeleton = true;
536
657
  this.width = "100%";
@@ -552,16 +673,16 @@ const ApplePay = class {
552
673
  this.applePayStarted.emit();
553
674
  const paymentRequest = {
554
675
  countryCode: this.countryCode,
555
- currencyCode: GooglePay$1.checkoutStore.paymentCurrency,
676
+ currencyCode: checkout_store.checkoutStore.paymentCurrency,
556
677
  merchantCapabilities: [
557
- GooglePay$1.ApplePayMerchantCapability.SUPPORTS_3DS,
558
- GooglePay$1.ApplePayMerchantCapability.SUPPORTS_CREDIT,
559
- GooglePay$1.ApplePayMerchantCapability.SUPPORTS_DEBIT,
678
+ ApplePayMerchantCapability.SUPPORTS_3DS,
679
+ ApplePayMerchantCapability.SUPPORTS_CREDIT,
680
+ ApplePayMerchantCapability.SUPPORTS_DEBIT,
560
681
  ],
561
- supportedNetworks: GooglePay$1.ApplePayHelpers.getDefaultSupportedNetworks(),
562
- total: GooglePay$1.ApplePayHelpers.createLineItem(GooglePay$1.checkoutStore.paymentDescription, GooglePay$1.checkoutStore.paymentAmount),
682
+ supportedNetworks: ApplePayHelpers.getDefaultSupportedNetworks(),
683
+ total: ApplePayHelpers.createLineItem(checkout_store.checkoutStore.paymentDescription, checkout_store.checkoutStore.paymentAmount),
563
684
  };
564
- const result = await this.applePayService.startPaymentSession(paymentRequest, GooglePay$1.checkoutStore.authToken, GooglePay$1.checkoutStore.accountId);
685
+ const result = await this.applePayService.startPaymentSession(paymentRequest, checkout_store.checkoutStore.authToken, checkout_store.checkoutStore.accountId);
565
686
  if (result.success) {
566
687
  this.applePayCompleted.emit({
567
688
  success: true,
@@ -599,24 +720,24 @@ const ApplePay = class {
599
720
  this.isLoading = true;
600
721
  this.error = null;
601
722
  this.isConfigValid = true;
602
- const hasRequiredConfig = Boolean(GooglePay$1.checkoutStore.paymentAmount) &&
603
- Boolean(GooglePay$1.checkoutStore.paymentCurrency) &&
604
- Boolean(GooglePay$1.checkoutStore.authToken);
723
+ const hasRequiredConfig = Boolean(checkout_store.checkoutStore.paymentAmount) &&
724
+ Boolean(checkout_store.checkoutStore.paymentCurrency) &&
725
+ Boolean(checkout_store.checkoutStore.authToken);
605
726
  if (!hasRequiredConfig) {
606
727
  this.error = "Missing required Apple Pay configuration";
607
728
  this.isConfigValid = false;
608
729
  console.error("Apple Pay config error: missing required values", {
609
- paymentAmount: GooglePay$1.checkoutStore.paymentAmount,
610
- paymentCurrency: GooglePay$1.checkoutStore.paymentCurrency,
611
- hasAuthToken: Boolean(GooglePay$1.checkoutStore.authToken),
612
- accountId: GooglePay$1.checkoutStore.accountId,
730
+ paymentAmount: checkout_store.checkoutStore.paymentAmount,
731
+ paymentCurrency: checkout_store.checkoutStore.paymentCurrency,
732
+ hasAuthToken: Boolean(checkout_store.checkoutStore.authToken),
733
+ accountId: checkout_store.checkoutStore.accountId,
613
734
  });
614
735
  this.applePayError.emit({ error: this.error, code: ApplePay.ErrorCode.CONFIG_ERROR });
615
736
  this.isLoading = false;
616
737
  return;
617
738
  }
618
- this.isAvailable = GooglePay$1.ApplePayHelpers.isApplePaySupported();
619
- this.canMakePayments = GooglePay$1.ApplePayHelpers.canMakePayments();
739
+ this.isAvailable = ApplePayHelpers.isApplePaySupported();
740
+ this.canMakePayments = ApplePayHelpers.canMakePayments();
620
741
  if (!this.isAvailable) {
621
742
  this.error = "Apple Pay is not supported on this device";
622
743
  console.error(this.error);
@@ -665,7 +786,7 @@ const ApplePay = class {
665
786
  if (!this.isAvailable) {
666
787
  return [];
667
788
  }
668
- return GooglePay$1.ApplePayHelpers.getDefaultSupportedNetworks();
789
+ return ApplePayHelpers.getDefaultSupportedNetworks();
669
790
  }
670
791
  async abort() {
671
792
  this.applePayService.abortPaymentSession();
@@ -673,7 +794,7 @@ const ApplePay = class {
673
794
  this.applePayCancelled.emit();
674
795
  }
675
796
  render() {
676
- if (!GooglePay$1.checkoutStore.applePayEnabled) {
797
+ if (!checkout_store.checkoutStore.applePayEnabled) {
677
798
  // Render nothing when Apple Pay is disabled at the checkout settings level
678
799
  return null;
679
800
  }
@@ -681,7 +802,7 @@ const ApplePay = class {
681
802
  this.isAvailable &&
682
803
  this.canMakePayments &&
683
804
  this.isConfigValid;
684
- return (index.h(styledHost.StyledHost, null, GooglePay$1.checkoutStore.checkoutLoaded && (index.h("script", { async: true, src: 'https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js', onLoad: () => {
805
+ return (index.h(styledHost.StyledHost, null, checkout_store.checkoutStore.checkoutLoaded && (index.h("script", { async: true, src: 'https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js', onLoad: () => {
685
806
  this.initializeApplePay();
686
807
  } })), index.h("div", { class: 'apple-pay-container' }, index.h(ApplePaySkeleton, { isLoading: this.isLoading }), isReady && (index.h(ApplePayButton, { buttonType: this.buttonType, buttonStyle: this.buttonStyle, disabled: this.disabled, isProcessing: this.isProcessing, isAvailable: this.isAvailable, clickHandler: this.handleApplePayClick, width: this.width, height: this.height }))), index.h("style", null, `
687
808
  .apple-pay-container {
@@ -704,740 +825,8 @@ const Summary = class {
704
825
  index.registerInstance(this, hostRef);
705
826
  }
706
827
  render() {
707
- return (index.h(styledHost.StyledHost, { key: '3ebaf90f9085614d44043d9b5ba7de3f926bf6f1' }, index.h("section", { key: '888ea6f17ece8e78b7ddf9302be5b1b355cd54c6' }, index.h("div", { key: 'bb7db155a31ceb9e824c5290b8fb8d8713622bdd' }, index.h("div", { key: 'dc954f18e824dabfb09fc727aeb87685020e2d1e', part: parts.text }, GooglePay$1.checkoutStore === null || GooglePay$1.checkoutStore === void 0 ? void 0 : GooglePay$1.checkoutStore.paymentDescription), index.h("div", { key: 'e7f6b12c142655fc967bd6a37e00193b9f743f84' }, index.h("span", { key: '25996f66626d428385422d72f5e2bba1a8301628', part: parts.text }, "Total"), "\u00A0", index.h("span", { key: '958bd1242ac23e13e66b73563d2c6f73499d2574', part: parts.text }, utils.formatCurrency(+(GooglePay$1.checkoutStore === null || GooglePay$1.checkoutStore === void 0 ? void 0 : GooglePay$1.checkoutStore.totalAmount))))))));
708
- }
709
- };
710
-
711
- const PROCESS_TOKEN_ENDPOINT = 'google_pay/process_token';
712
- class GooglePayService {
713
- constructor() {
714
- this.api = Api.Api();
715
- }
716
- /**
717
- * Initialize Google Pay configuration
718
- */
719
- initialize(googlePayConfig) {
720
- this.googlePayConfig = new GooglePay$1.GooglePayConfig(googlePayConfig);
721
- if (!this.googlePayConfig.isValid) {
722
- throw new Error('Invalid Google Pay configuration provided');
723
- }
724
- // Create Google Pay client
725
- this.googlePayClient = GooglePay$1.GooglePayHelpers.createGooglePayClient(this.googlePayConfig.environment);
726
- if (!this.googlePayClient) {
727
- throw new Error('Failed to create Google Pay client');
728
- }
729
- // No debug logs
730
- }
731
- /**
732
- * Process Google Pay payment via API
733
- */
734
- async processPayment(authToken, accountId, payload) {
735
- const endpoint = PROCESS_TOKEN_ENDPOINT;
736
- try {
737
- const result = await this.api.post({
738
- endpoint,
739
- authToken,
740
- body: payload,
741
- headers: {
742
- 'sub-account': accountId,
743
- },
744
- });
745
- return {
746
- success: result.id && !!result.data.token,
747
- data: result,
748
- };
749
- }
750
- catch (_error) {
751
- throw new Error('Google Pay payment processing failed');
752
- }
753
- }
754
- /**
755
- * Check if Google Pay is available on this device/browser
756
- */
757
- isAvailable() {
758
- return GooglePay$1.GooglePayHelpers.isGooglePaySupported() && !!this.googlePayClient;
759
- }
760
- /**
761
- * Check if the user can make payments with Google Pay
762
- */
763
- async canMakePayments() {
764
- if (!this.googlePayClient || !this.googlePayConfig) {
765
- return false;
766
- }
767
- try {
768
- const baseRequest = GooglePay$1.GooglePayHelpers.createBasePaymentDataRequest();
769
- const response = await this.googlePayClient.isReadyToPay(baseRequest);
770
- return response.result;
771
- }
772
- catch (_error) {
773
- return false;
774
- }
775
- }
776
- /**
777
- * Start Google Pay payment session
778
- */
779
- async startPaymentSession(paymentDataRequest, authToken, accountId) {
780
- var _a;
781
- if (!this.googlePayConfig || !this.googlePayClient) {
782
- throw new Error('Google Pay not initialized. Call initialize() first.');
783
- }
784
- if (!this.isAvailable()) {
785
- throw new Error('Google Pay is not available on this device/browser');
786
- }
787
- const request = new GooglePay$1.GooglePayPaymentDataRequest(paymentDataRequest);
788
- if (!request.isValid) {
789
- throw new Error('Invalid payment data request provided');
790
- }
791
- try {
792
- const paymentData = await this.googlePayClient.loadPaymentData(request);
793
- // Build top-level snake_case fields from Google Pay tokenizationData
794
- const tokenizationData = (_a = paymentData === null || paymentData === void 0 ? void 0 : paymentData.paymentMethodData) === null || _a === void 0 ? void 0 : _a.tokenizationData;
795
- const tokenObj = (() => {
796
- if ((tokenizationData === null || tokenizationData === void 0 ? void 0 : tokenizationData.token) &&
797
- typeof tokenizationData.token === 'string') {
798
- try {
799
- return JSON.parse(tokenizationData.token);
800
- }
801
- catch (_e) {
802
- return tokenizationData;
803
- }
804
- }
805
- return tokenizationData;
806
- })();
807
- const tokenProcessRequest = {
808
- protocolVersion: tokenObj === null || tokenObj === void 0 ? void 0 : tokenObj.protocolVersion,
809
- signature: tokenObj === null || tokenObj === void 0 ? void 0 : tokenObj.signature,
810
- intermediateSigningKey: (tokenObj === null || tokenObj === void 0 ? void 0 : tokenObj.intermediateSigningKey)
811
- ? {
812
- signedKey: tokenObj.intermediateSigningKey.signedKey,
813
- signatures: tokenObj.intermediateSigningKey.signatures,
814
- }
815
- : undefined,
816
- signedMessage: tokenObj === null || tokenObj === void 0 ? void 0 : tokenObj.signedMessage,
817
- };
818
- const paymentResult = await this.processPayment(authToken, accountId, tokenProcessRequest);
819
- if (paymentResult.success) {
820
- return {
821
- success: true,
822
- paymentData: paymentData,
823
- paymentMethodId: paymentResult.data.id,
824
- };
825
- }
826
- else {
827
- return {
828
- success: false,
829
- error: {
830
- code: 'PAYMENT_PROCESSING_ERROR',
831
- message: 'Payment processing failed',
832
- },
833
- };
834
- }
835
- }
836
- catch (error) {
837
- // Handle different types of errors
838
- if (error && typeof error === 'object' && 'statusCode' in error) {
839
- const googlePayError = error;
840
- switch (googlePayError.statusCode) {
841
- case 'CANCELED':
842
- return {
843
- success: false,
844
- error: {
845
- code: 'USER_CANCELLED',
846
- message: 'User cancelled the Google Pay session',
847
- },
848
- };
849
- case 'DEVELOPER_ERROR':
850
- return {
851
- success: false,
852
- error: {
853
- code: 'DEVELOPER_ERROR',
854
- message: 'Google Pay configuration error',
855
- },
856
- };
857
- default:
858
- return {
859
- success: false,
860
- error: {
861
- code: 'PAYMENT_ERROR',
862
- message: googlePayError.statusMessage || 'Google Pay payment failed',
863
- },
864
- };
865
- }
866
- }
867
- return {
868
- success: false,
869
- error: {
870
- code: 'PAYMENT_ERROR',
871
- message: error instanceof Error
872
- ? error.message
873
- : 'Google Pay payment failed',
874
- },
875
- };
876
- }
877
- }
878
- /**
879
- * Create Google Pay button element
880
- */
881
- createButton(options) {
882
- if (!this.googlePayClient || !this.googlePayConfig) {
883
- return null;
884
- }
885
- try {
886
- return this.googlePayClient.createButton({
887
- onClick: options.onClick,
888
- buttonType: options.buttonType,
889
- buttonSizeMode: options.buttonSizeMode,
890
- buttonColor: options.buttonColor,
891
- buttonLocale: options.buttonLocale,
892
- });
893
- }
894
- catch (_error) {
895
- return null;
896
- }
897
- }
898
- /**
899
- * Prefetch payment data for faster loading
900
- */
901
- prefetchPaymentData(paymentDataRequest) {
902
- if (!this.googlePayClient) {
903
- return;
904
- }
905
- const request = new GooglePay$1.GooglePayPaymentDataRequest(paymentDataRequest);
906
- if (!request.isValid) {
907
- return;
908
- }
909
- try {
910
- this.googlePayClient.prefetchPaymentData(request);
911
- }
912
- catch (_error) { }
913
- }
914
- /**
915
- * Create a basic payment data request
916
- */
917
- static createPaymentDataRequest(amount, label, countryCode = 'US', currencyCode = 'USD', merchantName) {
918
- const request = {
919
- apiVersion: 2,
920
- apiVersionMinor: 0,
921
- allowedPaymentMethods: [GooglePay$1.GooglePayHelpers.createPaymentMethodData()],
922
- transactionInfo: {
923
- countryCode,
924
- currencyCode,
925
- totalPriceStatus: 'FINAL',
926
- totalPrice: GooglePay$1.GooglePayHelpers.formatAmount(amount),
927
- totalPriceLabel: label,
928
- },
929
- merchantInfo: {
930
- merchantName,
931
- },
932
- };
933
- // No debug logs
934
- return request;
935
- }
936
- /**
937
- * Get current configuration
938
- */
939
- getGooglePayConfig() {
940
- return this.googlePayConfig;
941
- }
942
- /**
943
- * Get current Google Pay client
944
- */
945
- getGooglePayClient() {
946
- return this.googlePayClient;
947
- }
948
- }
949
-
950
- const GooglePaySkeleton = (props) => {
951
- const { isLoading } = props;
952
- if (!isLoading) {
953
- return null;
954
- }
955
- return (index.h("div", { class: 'container-fluid p-0' }, index.h("div", { class: 'row mb-3' }, index.h("div", { class: 'col-12 align-content-center' }, index.h(skeleton.Skeleton, { height: '44px', width: '100%', styles: { borderRadius: "8px" } })))));
956
- };
957
-
958
- const ProcessingSpinner = () => (index.h("div", { class: 'processing-overlay' }, index.h("div", { class: 'spinner' }), index.h("span", null, "Processing...")));
959
- const GooglePayButton = (props) => {
960
- const getGooglePayButtonClass = () => {
961
- let classes = "google-pay-button";
962
- // Button style
963
- switch (props.buttonStyle) {
964
- case GooglePay$1.GooglePayButtonStyle.WHITE:
965
- classes += " google-pay-button-white";
966
- break;
967
- case GooglePay$1.GooglePayButtonStyle.BLACK:
968
- default:
969
- classes += " google-pay-button-black";
970
- break;
971
- }
972
- // Button type
973
- switch (props.buttonType) {
974
- case GooglePay$1.GooglePayButtonType.BUY:
975
- classes += " google-pay-button-type-buy";
976
- break;
977
- case GooglePay$1.GooglePayButtonType.BOOK:
978
- classes += " google-pay-button-type-book";
979
- break;
980
- case GooglePay$1.GooglePayButtonType.CHECKOUT:
981
- classes += " google-pay-button-type-checkout";
982
- break;
983
- case GooglePay$1.GooglePayButtonType.DONATE:
984
- classes += " google-pay-button-type-donate";
985
- break;
986
- case GooglePay$1.GooglePayButtonType.ORDER:
987
- classes += " google-pay-button-type-order";
988
- break;
989
- case GooglePay$1.GooglePayButtonType.PAY:
990
- classes += " google-pay-button-type-pay";
991
- break;
992
- case GooglePay$1.GooglePayButtonType.SUBSCRIBE:
993
- classes += " google-pay-button-type-subscribe";
994
- break;
995
- case GooglePay$1.GooglePayButtonType.PLAIN:
996
- default:
997
- classes += " google-pay-button-type-plain";
998
- break;
999
- }
1000
- // Size mode
1001
- switch (props.buttonSizeMode) {
1002
- case GooglePay$1.GooglePayButtonSizeMode.FILL:
1003
- classes += " google-pay-button-fill";
1004
- break;
1005
- case GooglePay$1.GooglePayButtonSizeMode.STATIC:
1006
- default:
1007
- classes += " google-pay-button-static";
1008
- break;
1009
- }
1010
- if (props.disabled || props.isProcessing || !props.isAvailable) {
1011
- classes += " disabled";
1012
- }
1013
- return classes;
1014
- };
1015
- const getButtonStyles = () => {
1016
- const styles = {};
1017
- if (props.buttonSizeMode === GooglePay$1.GooglePayButtonSizeMode.FILL) {
1018
- styles.width = '100%';
1019
- styles.minWidth = '200px';
1020
- }
1021
- else {
1022
- styles.width = props.width || '200px';
1023
- }
1024
- styles.height = props.height || '48px';
1025
- return styles;
1026
- };
1027
- const handleClick = () => {
1028
- if (!props.disabled &&
1029
- !props.isProcessing &&
1030
- props.isAvailable &&
1031
- props.clickHandler) {
1032
- props.clickHandler();
1033
- }
1034
- };
1035
- return (index.h("div", { class: 'google-pay-button-container' }, index.h("button", Object.assign({ class: getGooglePayButtonClass(), style: getButtonStyles(), onClick: handleClick, disabled: props.disabled || props.isProcessing || !props.isAvailable, "aria-label": 'Pay with Google Pay', type: 'button' }, props), props.isProcessing && ProcessingSpinner(), index.h("div", { class: 'google-pay-button-content' }, index.h("svg", { class: 'google-g-logo', viewBox: '0 0 24 24', xmlns: 'http://www.w3.org/2000/svg' }, index.h("path", { d: 'M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z', fill: '#4285F4' }), index.h("path", { d: 'M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z', fill: '#34A853' }), index.h("path", { d: 'M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z', fill: '#FBBC05' }), index.h("path", { d: 'M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z', fill: '#EA4335' })), index.h("span", { class: 'pay-text' }, "Pay"))), index.h("style", null, `
1036
- .google-pay-button-container {
1037
- display: block;
1038
- position: relative;
1039
- }
1040
-
1041
- .google-pay-button {
1042
- display: flex;
1043
- align-items: center;
1044
- justify-content: center;
1045
- border: none;
1046
- border-radius: 4px;
1047
- cursor: pointer;
1048
- font-family: 'Google Sans', arial, sans-serif;
1049
- font-size: 14px;
1050
- font-weight: 500;
1051
- letter-spacing: 0.25px;
1052
- line-height: 16px;
1053
- outline: none;
1054
- padding: 0 20px;
1055
- position: relative;
1056
- transition: box-shadow 0.2s ease;
1057
- min-width: 140px;
1058
- min-height: 48px;
1059
- }
1060
-
1061
- /* Button styles */
1062
- .google-pay-button.google-pay-button-black {
1063
- background-color: #000;
1064
- color: #fff;
1065
- box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.12), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
1066
- }
1067
-
1068
- .google-pay-button.google-pay-button-white {
1069
- background-color: #fff;
1070
- color: #3c4043;
1071
- box-shadow: 0 1px 1px 0 rgba(60, 64, 67, 0.30), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
1072
- }
1073
-
1074
- /* Button content */
1075
- .google-pay-button-content {
1076
- display: flex;
1077
- align-items: center;
1078
- justify-content: center;
1079
- gap: 8px;
1080
- white-space: nowrap;
1081
- }
1082
-
1083
- .google-g-logo {
1084
- width: 20px;
1085
- height: 20px;
1086
- flex-shrink: 0;
1087
- }
1088
-
1089
- .pay-text {
1090
- font-family: 'Google Sans', arial, sans-serif;
1091
- font-size: 14px;
1092
- font-weight: 500;
1093
- margin-left: 8px;
1094
- }
1095
-
1096
- /* Button types - text content handled by ::before pseudo-element */
1097
- .google-pay-button-type-buy .google-pay-button-content::before {
1098
- content: 'Buy with';
1099
- margin-right: 8px;
1100
- }
1101
-
1102
- .google-pay-button-type-book .google-pay-button-content::before {
1103
- content: 'Book with';
1104
- margin-right: 8px;
1105
- }
1106
-
1107
- .google-pay-button-type-checkout .google-pay-button-content::before {
1108
- content: 'Checkout with';
1109
- margin-right: 8px;
1110
- }
1111
-
1112
- .google-pay-button-type-donate .google-pay-button-content::before {
1113
- content: 'Donate with';
1114
- margin-right: 8px;
1115
- }
1116
-
1117
- .google-pay-button-type-order .google-pay-button-content::before {
1118
- content: 'Order with';
1119
- margin-right: 8px;
1120
- }
1121
-
1122
- .google-pay-button-type-pay .google-pay-button-content::before {
1123
- content: 'Pay with';
1124
- margin-right: 8px;
1125
- }
1126
-
1127
- .google-pay-button-type-subscribe .google-pay-button-content::before {
1128
- content: 'Subscribe with';
1129
- margin-right: 8px;
1130
- }
1131
-
1132
- /* Size modes */
1133
- .google-pay-button.google-pay-button-fill {
1134
- width: 100%;
1135
- min-width: 200px;
1136
- }
1137
-
1138
- .google-pay-button.google-pay-button-static {
1139
- width: auto;
1140
- }
1141
-
1142
- /* Hover and focus states */
1143
- .google-pay-button:hover:not(.disabled) {
1144
- box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);
1145
- }
1146
-
1147
- .google-pay-button:focus:not(.disabled) {
1148
- box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);
1149
- }
1150
-
1151
- .google-pay-button:active:not(.disabled) {
1152
- box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);
1153
- transform: translateY(1px);
1154
- }
1155
-
1156
- /* Disabled state */
1157
- .google-pay-button.disabled {
1158
- opacity: 0.5;
1159
- cursor: not-allowed;
1160
- box-shadow: none;
1161
- }
1162
-
1163
- .google-pay-button.disabled:hover,
1164
- .google-pay-button.disabled:focus,
1165
- .google-pay-button.disabled:active {
1166
- box-shadow: none;
1167
- transform: none;
1168
- }
1169
-
1170
- /* Processing overlay */
1171
- .processing-overlay {
1172
- position: absolute;
1173
- top: 0;
1174
- left: 0;
1175
- right: 0;
1176
- bottom: 0;
1177
- display: flex;
1178
- align-items: center;
1179
- justify-content: center;
1180
- gap: 8px;
1181
- background: rgba(0, 0, 0, 0.8);
1182
- color: white;
1183
- border-radius: 4px;
1184
- font-size: 14px;
1185
- font-weight: 500;
1186
- }
1187
-
1188
- .spinner {
1189
- width: 16px;
1190
- height: 16px;
1191
- border: 2px solid rgba(255, 255, 255, 0.3);
1192
- border-top: 2px solid #fff;
1193
- border-radius: 50%;
1194
- animation: spin 1s linear infinite;
1195
- }
1196
-
1197
- @keyframes spin {
1198
- 0% { transform: rotate(0deg); }
1199
- 100% { transform: rotate(360deg); }
1200
- }
1201
-
1202
- /* Responsive design */
1203
- @media (max-width: 480px) {
1204
- .google-pay-button {
1205
- width: 100% !important;
1206
- min-width: 200px;
1207
- }
1208
- }
1209
- `)));
1210
- };
1211
-
1212
- const GooglePay = class {
1213
- constructor(hostRef) {
1214
- index.registerInstance(this, hostRef);
1215
- this.googlePayCancelled = index.createEvent(this, "googlePayCancelled");
1216
- this.googlePayCompleted = index.createEvent(this, "googlePayCompleted");
1217
- this.googlePayStarted = index.createEvent(this, "googlePayStarted");
1218
- this.unsubscribes = [];
1219
- this.canMakePayments = false;
1220
- this.error = null;
1221
- this.isAvailable = false;
1222
- this.isLoading = true;
1223
- this.isProcessing = false;
1224
- this.buttonSizeMode = GooglePay$1.GooglePayButtonSizeMode.FILL;
1225
- this.buttonStyle = GooglePay$1.GooglePayButtonStyle.BLACK;
1226
- this.buttonType = GooglePay$1.GooglePayButtonType.PLAIN;
1227
- this.countryCode = "US";
1228
- this.disabled = false;
1229
- this.environment = GooglePay$1.GooglePayEnvironment.PRODUCTION;
1230
- this.merchantId = "gateway:justifi";
1231
- this.merchantName = "justifi";
1232
- this.showSkeleton = true;
1233
- this.handleGooglePayClick = async () => {
1234
- var _a;
1235
- if (this.isProcessing ||
1236
- this.disabled ||
1237
- !this.isAvailable ||
1238
- !this.canMakePayments) {
1239
- return;
1240
- }
1241
- try {
1242
- this.isProcessing = true;
1243
- this.error = null;
1244
- this.googlePayStarted.emit();
1245
- const paymentDataRequest = this.createPaymentDataRequest();
1246
- const result = await this.googlePayService.startPaymentSession(paymentDataRequest, GooglePay$1.checkoutStore.authToken, GooglePay$1.checkoutStore.accountId);
1247
- if (result.success) {
1248
- this.googlePayCompleted.emit({
1249
- success: true,
1250
- paymentData: result.paymentData,
1251
- paymentMethodId: result.paymentMethodId,
1252
- });
1253
- }
1254
- else {
1255
- this.googlePayCompleted.emit({
1256
- success: false,
1257
- error: result.error,
1258
- });
1259
- if (((_a = result.error) === null || _a === void 0 ? void 0 : _a.code) === "USER_CANCELLED") {
1260
- this.googlePayCancelled.emit();
1261
- }
1262
- }
1263
- }
1264
- catch (error) {
1265
- const errorMessage = error instanceof Error ? error.message : "Payment failed";
1266
- this.error = errorMessage;
1267
- this.googlePayCompleted.emit({
1268
- success: false,
1269
- error: errorMessage,
1270
- });
1271
- }
1272
- finally {
1273
- this.isProcessing = false;
1274
- }
1275
- };
1276
- }
1277
- watchConfigChange() {
1278
- this.initializeGooglePay();
1279
- }
1280
- componentWillLoad() {
1281
- this.googlePayService = new GooglePayService();
1282
- }
1283
- componentDidLoad() {
1284
- const unsub = GooglePay$1.onChange("paymentAmount", () => {
1285
- this.prefetchPaymentData();
1286
- });
1287
- if (typeof unsub === 'function')
1288
- this.unsubscribes.push(unsub);
1289
- const unsubCurrency = GooglePay$1.onChange("paymentCurrency", () => {
1290
- this.prefetchPaymentData();
1291
- });
1292
- if (typeof unsubCurrency === 'function')
1293
- this.unsubscribes.push(unsubCurrency);
1294
- const unsubDesc = GooglePay$1.onChange("paymentDescription", () => {
1295
- this.prefetchPaymentData();
1296
- });
1297
- if (typeof unsubDesc === 'function')
1298
- this.unsubscribes.push(unsubDesc);
1299
- }
1300
- disconnectedCallback() {
1301
- this.unsubscribes.forEach((fn) => {
1302
- try {
1303
- fn();
1304
- }
1305
- catch (_a) { }
1306
- });
1307
- this.unsubscribes = [];
1308
- }
1309
- /**
1310
- * Returns supported authentication methods when Google Pay is available.
1311
- */
1312
- async getSupportedAuthMethods() {
1313
- if (!this.isAvailable) {
1314
- return [];
1315
- }
1316
- return GooglePay$1.GooglePayHelpers.getDefaultAuthMethods();
1317
- }
1318
- /**
1319
- * Returns supported card networks when Google Pay is available.
1320
- */
1321
- async getSupportedNetworks() {
1322
- if (!this.isAvailable) {
1323
- return [];
1324
- }
1325
- return GooglePay$1.GooglePayHelpers.getDefaultSupportedNetworks();
1326
- }
1327
- /**
1328
- * Select Google Pay in the modular checkout parent.
1329
- */
1330
- async handleSelectionClick() {
1331
- GooglePay$1.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.GOOGLE_PAY };
1332
- }
1333
- /**
1334
- * Returns whether Google Pay is both available and can make payments.
1335
- */
1336
- async isSupported() {
1337
- return this.isAvailable && this.canMakePayments;
1338
- }
1339
- /**
1340
- * Prefetch payment data for faster load times of the Google Pay sheet.
1341
- */
1342
- async prefetchPaymentData() {
1343
- if (!this.isAvailable || !this.canMakePayments) {
1344
- return;
1345
- }
1346
- const paymentDataRequest = this.createPaymentDataRequest();
1347
- this.googlePayService.prefetchPaymentData(paymentDataRequest);
1348
- }
1349
- async initializeGooglePay() {
1350
- try {
1351
- this.isLoading = true;
1352
- this.error = null;
1353
- if (!GooglePay$1.checkoutStore.paymentAmount) {
1354
- this.error = "Missing required Google Pay configuration";
1355
- this.isLoading = false;
1356
- return;
1357
- }
1358
- const googlePayConfig = {
1359
- environment: this.environment,
1360
- merchantId: this.merchantId,
1361
- merchantName: this.merchantName,
1362
- buttonType: this.buttonType,
1363
- buttonStyle: this.buttonStyle,
1364
- buttonSizeMode: this.buttonSizeMode,
1365
- };
1366
- this.googlePayService.initialize(googlePayConfig);
1367
- this.isAvailable = this.googlePayService.isAvailable();
1368
- if (!this.isAvailable) {
1369
- this.error = "Google Pay is not supported on this device";
1370
- this.isLoading = false;
1371
- return;
1372
- }
1373
- this.canMakePayments = await this.googlePayService.canMakePayments();
1374
- if (!this.canMakePayments) {
1375
- this.error = "Google Pay is not available for payments";
1376
- this.isLoading = false;
1377
- return;
1378
- }
1379
- const paymentDataRequest = this.createPaymentDataRequest();
1380
- this.googlePayService.prefetchPaymentData(paymentDataRequest);
1381
- }
1382
- catch (error) {
1383
- this.error =
1384
- error instanceof Error
1385
- ? error.message
1386
- : "Failed to initialize Google Pay";
1387
- }
1388
- finally {
1389
- this.isLoading = false;
1390
- }
1391
- }
1392
- createPaymentDataRequest() {
1393
- return GooglePayService.createPaymentDataRequest(GooglePay$1.checkoutStore.paymentAmount, GooglePay$1.checkoutStore.paymentDescription, this.countryCode, GooglePay$1.checkoutStore.paymentCurrency, this.merchantName);
1394
- }
1395
- render() {
1396
- const showError = !this.isLoading && !!this.error;
1397
- const showDeviceUnavailable = !this.isLoading && !this.error && !this.isAvailable;
1398
- const showPaymentsUnavailable = !this.isLoading && !this.error && this.isAvailable && !this.canMakePayments;
1399
- const showButton = !this.isLoading && !this.error && this.isAvailable && this.canMakePayments;
1400
- return (index.h(styledHost.StyledHost, { key: 'd85684b123cdba175d68a2e216f9150780ac7cf9' }, GooglePay$1.checkoutStore.checkoutLoaded && (index.h("script", { key: 'b78bb8980d670e5b66cb907f89cee6ff2238205c', async: true, src: 'https://pay.google.com/gp/p/js/pay.js', onLoad: () => {
1401
- this.initializeGooglePay();
1402
- } })), index.h("div", { key: 'e405efb3a164be9e1d9db5beeb3c01471b647aaf', class: 'google-pay-container' }, index.h(GooglePaySkeleton, { key: 'c17dbb3e305678a1da10e3741ff0b610c549be6e', isLoading: this.isLoading }), showError && (index.h("div", { key: '726895b7c76f3edbbbb1930a317d826b8f8f11fd', class: 'google-pay-error', role: 'alert', "data-testid": 'gp-error' }, index.h("span", { key: '23342ca70b6b5bf28f846ca519cc4fbfb065fc67', class: 'error-icon' }, "\u26A0\uFE0F"), index.h("span", { key: '008315696bc7b7f78f69cfc80160dacabf1205b5', class: 'error-message' }, this.error))), showDeviceUnavailable && (index.h("div", { key: '2e87b4a9e5d0c0201333b79b9c190ca14932391b', class: 'google-pay-unavailable', "data-testid": 'gp-device-unavailable' }, index.h("span", { key: '6db13fc44661500a964422d18550cb31e275f076', class: 'unavailable-message' }, "Google Pay is not available on this device"))), showPaymentsUnavailable && (index.h("div", { key: 'c2ca09e36652800092cc6bcbe4a351b0d604bae2', class: 'google-pay-unavailable', "data-testid": 'gp-payments-unavailable' }, index.h("span", { key: 'a5e75ccbb269249327192b927a0df879d90aefe5', class: 'unavailable-message' }, "Google Pay is not available for payments"))), showButton && (index.h(GooglePayButton, { key: 'a2af46b3970620491e5c005e2b57f7a6d6f06e2c', "data-testid": 'gp-button', buttonType: this.buttonType, buttonStyle: this.buttonStyle, buttonSizeMode: this.buttonSizeMode, disabled: this.disabled, isProcessing: this.isProcessing, isAvailable: this.isAvailable, clickHandler: this.handleGooglePayClick }))), index.h("style", { key: '9890ac44c4f047484396e0b4ae0d04a31489e61f' }, `
1403
- .google-pay-container {
1404
- width: 100%;
1405
- }
1406
-
1407
- .google-pay-error {
1408
- display: flex;
1409
- align-items: center;
1410
- gap: 8px;
1411
- padding: 12px;
1412
- background: #fef2f2;
1413
- border: 1px solid #fecaca;
1414
- border-radius: 8px;
1415
- color: #dc2626;
1416
- font-size: 14px;
1417
- }
1418
-
1419
- .google-pay-unavailable {
1420
- display: flex;
1421
- align-items: center;
1422
- justify-content: center;
1423
- padding: 12px;
1424
- background: #f9fafb;
1425
- border: 1px solid #e5e7eb;
1426
- border-radius: 8px;
1427
- color: #6b7280;
1428
- font-size: 14px;
1429
- }
1430
-
1431
- .error-icon {
1432
- font-size: 16px;
1433
- }
1434
-
1435
- `)));
828
+ return (index.h(styledHost.StyledHost, { key: 'fd2c61dcafdc800d0064c19d29c6e007aed5adb5' }, index.h("section", { key: 'f2abef1233f3ccad3982d10c61ec5765e13e27a5' }, index.h("div", { key: '713d66ef6f7e2fc73135e765069baba6df976f52' }, index.h("div", { key: 'b8dd28f257948aa317366fe3ea6d2bc4911ef164', part: parts.text }, checkout_store.checkoutStore === null || checkout_store.checkoutStore === void 0 ? void 0 : checkout_store.checkoutStore.paymentDescription), index.h("div", { key: '675676b40de7dc27d07bfafc0eee77eb855a3d26' }, index.h("span", { key: 'cbd47994d9c3f1518741a298de3f5d62a0ad5313', part: parts.text }, "Total"), "\u00A0", index.h("span", { key: '614748853f666f1b072d4fa9b14ee15ef5717112', part: parts.text }, utils.formatCurrency(+(checkout_store.checkoutStore === null || checkout_store.checkoutStore === void 0 ? void 0 : checkout_store.checkoutStore.totalAmount))))))));
1436
829
  }
1437
- static get watchers() { return {
1438
- "merchantId": ["watchConfigChange"],
1439
- "environment": ["watchConfigChange"]
1440
- }; }
1441
830
  };
1442
831
 
1443
832
  const Header = class {
@@ -1452,7 +841,7 @@ const Header = class {
1452
841
  }
1453
842
  render() {
1454
843
  const HeaderComponent = this.levels[this.level];
1455
- return (index.h(styledHost.StyledHost, { key: '73104ea086f8a9948e69f86451adf19e0f39fb32' }, index.h(HeaderComponent, { key: 'a8582109634299a24e2a9b3c7181c6bba511fde7', text: this.text, class: this.class })));
844
+ return (index.h(styledHost.StyledHost, { key: 'd4871da09451d40b27220a207ee72317ed9b1b9f' }, index.h(HeaderComponent, { key: 'f7de159fa6395ef4024f48b868369f8d10edf64e', text: this.text, class: this.class })));
1456
845
  }
1457
846
  };
1458
847
 
@@ -1538,30 +927,11 @@ const ModularCheckout = class {
1538
927
  this.submitEvent = index.createEvent(this, "submit-event");
1539
928
  this.checkoutChangedEvent = index.createEvent(this, "checkout-changed");
1540
929
  this.plaidService = new PlaidService();
1541
- this.handleGooglePayCompleted = (event) => {
1542
- const { success, paymentMethodId, error } = event.detail || {};
1543
- if (success && paymentMethodId) {
1544
- GooglePay$1.checkoutStore.paymentToken = paymentMethodId;
1545
- GooglePay$1.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.GOOGLE_PAY };
1546
- this.submitCheckout();
1547
- }
1548
- else {
1549
- this.errorEvent.emit({
1550
- message: (error && error.message) || "Google Pay payment failed",
1551
- errorCode: ComponentError.ComponentErrorCodes.TOKENIZE_ERROR,
1552
- severity: ComponentError.ComponentErrorSeverity.ERROR,
1553
- });
1554
- }
1555
- };
1556
- this.handleGooglePayCancelled = () => {
1557
- GooglePay$1.checkoutStore.paymentToken = undefined;
1558
- GooglePay$1.checkoutStore.selectedPaymentMethod = undefined;
1559
- };
1560
930
  this.handleApplePayCompleted = (event) => {
1561
931
  const { success, token, paymentMethodId, error } = event.detail;
1562
932
  if (success && token) {
1563
- GooglePay$1.checkoutStore.paymentToken = paymentMethodId;
1564
- GooglePay$1.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.APPLE_PAY };
933
+ checkout_store.checkoutStore.paymentToken = paymentMethodId;
934
+ checkout_store.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.APPLE_PAY };
1565
935
  this.submitCheckout();
1566
936
  }
1567
937
  else {
@@ -1584,21 +954,20 @@ const ModularCheckout = class {
1584
954
  });
1585
955
  };
1586
956
  this.handleApplePayCancelled = () => {
1587
- GooglePay$1.checkoutStore.paymentToken = undefined;
1588
- GooglePay$1.checkoutStore.selectedPaymentMethod = undefined;
957
+ checkout_store.checkoutStore.paymentToken = undefined;
958
+ checkout_store.checkoutStore.selectedPaymentMethod = undefined;
1589
959
  };
1590
960
  }
1591
961
  connectedCallback() {
1592
962
  this.observer = new MutationObserver(() => {
1593
963
  this.queryFormRefs();
1594
964
  this.setupApplePayListeners(); // set up again listeners when DOM changes
1595
- this.setupGooglePayListeners();
1596
965
  });
1597
966
  this.observer.observe(this.hostEl, {
1598
967
  childList: true,
1599
968
  subtree: true,
1600
969
  });
1601
- GooglePay$1.checkoutStore.checkoutId = this.checkoutId;
970
+ checkout_store.checkoutStore.checkoutId = this.checkoutId;
1602
971
  const config = {
1603
972
  authToken: this.authToken,
1604
973
  checkoutId: this.checkoutId,
@@ -1607,14 +976,14 @@ const ModularCheckout = class {
1607
976
  this.getCheckout = makeGetCheckout(config);
1608
977
  this.completeCheckout = makeCheckoutComplete(config);
1609
978
  // Emit checkout-changed whenever any store key changes
1610
- GooglePay$1.onAnyChange(() => {
979
+ checkout_store.onAnyChange(() => {
1611
980
  this.emitCheckoutChanged();
1612
981
  });
1613
982
  }
1614
983
  componentWillLoad() {
1615
984
  this.analytics = new checkPkgVersion.JustifiAnalytics(this);
1616
985
  checkPkgVersion.checkPkgVersion();
1617
- GooglePay$1.checkoutStore.authToken = this.authToken;
986
+ checkout_store.checkoutStore.authToken = this.authToken;
1618
987
  this.fetchCheckout();
1619
988
  // Refresh the checkout data when insurance values actually change (not on initial load)
1620
989
  insuranceState.insuranceValuesOn("set", (key) => {
@@ -1627,13 +996,11 @@ const ModularCheckout = class {
1627
996
  componentDidLoad() {
1628
997
  this.queryFormRefs();
1629
998
  this.setupApplePayListeners();
1630
- this.setupGooglePayListeners();
1631
999
  }
1632
1000
  disconnectedCallback() {
1633
1001
  var _a;
1634
1002
  (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
1635
1003
  this.removeApplePayListeners();
1636
- this.removeGooglePayListeners();
1637
1004
  }
1638
1005
  fetchCheckout() {
1639
1006
  if (!this.authToken || !this.checkoutId) {
@@ -1648,7 +1015,7 @@ const ModularCheckout = class {
1648
1015
  this.getCheckout({
1649
1016
  onSuccess: ({ checkout }) => {
1650
1017
  this.updateStore(checkout);
1651
- if (checkout.status === GooglePay$1.ICheckoutStatus.completed) {
1018
+ if (checkout.status === Refund.ICheckoutStatus.completed) {
1652
1019
  this.errorEvent.emit({
1653
1020
  message: ComponentError.ComponentErrorMessages.CHECKOUT_ALREADY_COMPLETED,
1654
1021
  errorCode: ComponentError.ComponentErrorCodes.CHECKOUT_ALREADY_COMPLETED,
@@ -1656,7 +1023,7 @@ const ModularCheckout = class {
1656
1023
  });
1657
1024
  return;
1658
1025
  }
1659
- else if (checkout.status === GooglePay$1.ICheckoutStatus.expired) {
1026
+ else if (checkout.status === Refund.ICheckoutStatus.expired) {
1660
1027
  this.errorEvent.emit({
1661
1028
  message: ComponentError.ComponentErrorMessages.CHECKOUT_EXPIRED,
1662
1029
  errorCode: ComponentError.ComponentErrorCodes.CHECKOUT_EXPIRED,
@@ -1676,37 +1043,35 @@ const ModularCheckout = class {
1676
1043
  }
1677
1044
  }
1678
1045
  updateStore(checkout) {
1679
- var _a, _b, _c, _d, _e, _f, _g;
1680
- GooglePay$1.checkoutStore.accountId = checkout.account_id;
1681
- GooglePay$1.checkoutStore.checkoutLoaded = true;
1682
- GooglePay$1.checkoutStore.paymentMethods = checkout.payment_methods.map((paymentMethod) => new index$1.PaymentMethod(paymentMethod));
1683
- GooglePay$1.checkoutStore.paymentMethodGroupId = checkout.payment_method_group_id;
1684
- GooglePay$1.checkoutStore.paymentDescription = checkout.payment_description;
1685
- GooglePay$1.checkoutStore.totalAmount = checkout.total_amount;
1686
- GooglePay$1.checkoutStore.paymentAmount = checkout.payment_amount;
1687
- GooglePay$1.checkoutStore.bnplEnabled = checkout.payment_settings.bnpl_payments;
1688
- GooglePay$1.checkoutStore.insuranceEnabled = checkout.payment_settings.insurance_payments;
1689
- GooglePay$1.checkoutStore.bankAccountVerification = (_a = checkout.payment_settings) === null || _a === void 0 ? void 0 : _a.bank_account_verification;
1690
- GooglePay$1.checkoutStore.applePayEnabled = (_b = checkout.payment_settings) === null || _b === void 0 ? void 0 : _b.apple_payments;
1691
- GooglePay$1.checkoutStore.googlePayEnabled = (_c = checkout.payment_settings) === null || _c === void 0 ? void 0 : _c.google_payments;
1692
- GooglePay$1.checkoutStore.bnplProviderClientId = (_d = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _d === void 0 ? void 0 : _d.provider_client_id;
1693
- GooglePay$1.checkoutStore.bnplProviderMode = (_e = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _e === void 0 ? void 0 : _e.provider_mode;
1694
- GooglePay$1.checkoutStore.bnplProviderApiVersion = (_f = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _f === void 0 ? void 0 : _f.provider_api_version;
1695
- GooglePay$1.checkoutStore.bnplProviderCheckoutUrl =
1696
- (_g = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _g === void 0 ? void 0 : _g.provider_checkout_url;
1046
+ var _a, _b, _c, _d, _e, _f;
1047
+ checkout_store.checkoutStore.accountId = checkout.account_id;
1048
+ checkout_store.checkoutStore.checkoutLoaded = true;
1049
+ checkout_store.checkoutStore.paymentMethods = checkout.payment_methods.map((paymentMethod) => new index$1.PaymentMethod(paymentMethod));
1050
+ checkout_store.checkoutStore.paymentMethodGroupId = checkout.payment_method_group_id;
1051
+ checkout_store.checkoutStore.paymentDescription = checkout.payment_description;
1052
+ checkout_store.checkoutStore.totalAmount = checkout.total_amount;
1053
+ checkout_store.checkoutStore.paymentAmount = checkout.payment_amount;
1054
+ checkout_store.checkoutStore.bnplEnabled = checkout.payment_settings.bnpl_payments;
1055
+ checkout_store.checkoutStore.insuranceEnabled = checkout.payment_settings.insurance_payments;
1056
+ checkout_store.checkoutStore.bankAccountVerification = (_a = checkout.payment_settings) === null || _a === void 0 ? void 0 : _a.bank_account_verification;
1057
+ checkout_store.checkoutStore.applePayEnabled = (_b = checkout.payment_settings) === null || _b === void 0 ? void 0 : _b.apple_payments;
1058
+ checkout_store.checkoutStore.bnplProviderClientId = (_c = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _c === void 0 ? void 0 : _c.provider_client_id;
1059
+ checkout_store.checkoutStore.bnplProviderMode = (_d = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _d === void 0 ? void 0 : _d.provider_mode;
1060
+ checkout_store.checkoutStore.bnplProviderApiVersion = (_e = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _e === void 0 ? void 0 : _e.provider_api_version;
1061
+ checkout_store.checkoutStore.bnplProviderCheckoutUrl =
1062
+ (_f = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _f === void 0 ? void 0 : _f.provider_checkout_url;
1697
1063
  }
1698
1064
  emitCheckoutChanged() {
1699
1065
  const detail = {
1700
- availablePaymentMethodTypes: GooglePay$1.getAvailablePaymentMethodTypes(),
1701
- selectedPaymentMethod: GooglePay$1.checkoutStore.selectedPaymentMethod,
1702
- savedPaymentMethods: GooglePay$1.checkoutStore.paymentMethods,
1066
+ availablePaymentMethodTypes: checkout_store.getAvailablePaymentMethodTypes(),
1067
+ selectedPaymentMethod: checkout_store.checkoutStore.selectedPaymentMethod,
1068
+ savedPaymentMethods: checkout_store.checkoutStore.paymentMethods,
1703
1069
  };
1704
1070
  this.checkoutChangedEvent.emit(detail);
1705
1071
  }
1706
1072
  queryFormRefs() {
1707
1073
  this.billingFormRef = this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full");
1708
1074
  this.applePayRef = this.hostEl.querySelector("justifi-apple-pay");
1709
- this.googlePayRef = this.hostEl.querySelector("justifi-google-pay");
1710
1075
  this.paymentMethodFormRef =
1711
1076
  this.hostEl.querySelector('justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method');
1712
1077
  this.insuranceFormRef = this.hostEl.querySelector('justifi-season-interruption-insurance');
@@ -1725,52 +1090,40 @@ const ModularCheckout = class {
1725
1090
  this.applePayRef.removeEventListener("applePayCancelled", this.handleApplePayCancelled);
1726
1091
  }
1727
1092
  }
1728
- setupGooglePayListeners() {
1729
- if (this.googlePayRef) {
1730
- this.googlePayRef.addEventListener("googlePayCompleted", this.handleGooglePayCompleted);
1731
- this.googlePayRef.addEventListener("googlePayCancelled", this.handleGooglePayCancelled);
1732
- }
1733
- }
1734
- removeGooglePayListeners() {
1735
- if (this.googlePayRef) {
1736
- this.googlePayRef.removeEventListener("googlePayCompleted", this.handleGooglePayCompleted);
1737
- this.googlePayRef.removeEventListener("googlePayCancelled", this.handleGooglePayCancelled);
1738
- }
1739
- }
1740
1093
  async tokenizePaymentMethod(tokenizeArgs) {
1741
1094
  var _a, _b, _c;
1742
1095
  const billingInfoValues = (_b = (await ((_a = this.billingFormRef) === null || _a === void 0 ? void 0 : _a.getValues()))) !== null && _b !== void 0 ? _b : {};
1743
1096
  const combinedBillingInfo = Object.assign(Object.assign({}, tokenizeArgs), billingInfoValues);
1744
- const paymentMethodMetadata = Object.assign({ accountId: GooglePay$1.checkoutStore.accountId, payment_method_group_id: undefined }, combinedBillingInfo);
1745
- if (GooglePay$1.checkoutStore.savePaymentMethod) {
1097
+ const paymentMethodMetadata = Object.assign({ accountId: checkout_store.checkoutStore.accountId, payment_method_group_id: undefined }, combinedBillingInfo);
1098
+ if (checkout_store.checkoutStore.savePaymentMethod) {
1746
1099
  paymentMethodMetadata.payment_method_group_id =
1747
- GooglePay$1.checkoutStore.paymentMethodGroupId;
1100
+ checkout_store.checkoutStore.paymentMethodGroupId;
1748
1101
  }
1749
1102
  const tokenizeResult = await ((_c = this.paymentMethodFormRef) === null || _c === void 0 ? void 0 : _c.tokenize({
1750
1103
  clientId: this.authToken,
1751
1104
  paymentMethodMetadata,
1752
- account: GooglePay$1.checkoutStore.accountId,
1105
+ account: checkout_store.checkoutStore.accountId,
1753
1106
  }));
1754
1107
  if (tokenizeResult.error) {
1755
1108
  return tokenizeResult;
1756
1109
  }
1757
- GooglePay$1.checkoutStore.paymentToken = tokenizeResult.id;
1110
+ checkout_store.checkoutStore.paymentToken = tokenizeResult.id;
1758
1111
  return tokenizeResult.id;
1759
1112
  }
1760
1113
  // set the selected payment method to the checkout store from outside the component
1761
1114
  async setSelectedPaymentMethod(paymentMethod) {
1762
- GooglePay$1.checkoutStore.selectedPaymentMethod = paymentMethod;
1763
- GooglePay$1.checkoutStore.paymentToken = paymentMethod.id || undefined;
1115
+ checkout_store.checkoutStore.selectedPaymentMethod = paymentMethod;
1116
+ checkout_store.checkoutStore.paymentToken = paymentMethod.id || undefined;
1764
1117
  }
1765
1118
  // if validation fails, the error will be emitted by the component
1766
1119
  async validate() {
1767
1120
  var _a, _b;
1768
1121
  const promises = [];
1769
- if (GooglePay$1.checkoutStore.insuranceEnabled && this.insuranceFormRef) {
1122
+ if (checkout_store.checkoutStore.insuranceEnabled && this.insuranceFormRef) {
1770
1123
  promises.push(this.insuranceFormRef.validate());
1771
1124
  }
1772
- const isNewCard = ((_a = GooglePay$1.checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === index$1.PAYMENT_METHODS.NEW_CARD;
1773
- const isNewBankAccount = ((_b = GooglePay$1.checkoutStore.selectedPaymentMethod) === null || _b === void 0 ? void 0 : _b.type) === index$1.PAYMENT_METHODS.NEW_BANK_ACCOUNT;
1125
+ const isNewCard = ((_a = checkout_store.checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === index$1.PAYMENT_METHODS.NEW_CARD;
1126
+ const isNewBankAccount = ((_b = checkout_store.checkoutStore.selectedPaymentMethod) === null || _b === void 0 ? void 0 : _b.type) === index$1.PAYMENT_METHODS.NEW_BANK_ACCOUNT;
1774
1127
  // For new card/bank account, validate payment method + billing.
1775
1128
  if (isNewCard || isNewBankAccount) {
1776
1129
  if (this.paymentMethodFormRef)
@@ -1804,7 +1157,7 @@ const ModularCheckout = class {
1804
1157
  async submitCheckout(submitCheckoutArgs) {
1805
1158
  var _a, _b, _c, _d, _e;
1806
1159
  const isValid = await this.validate();
1807
- if (!GooglePay$1.checkoutStore.selectedPaymentMethod) {
1160
+ if (!checkout_store.checkoutStore.selectedPaymentMethod) {
1808
1161
  this.errorEvent.emit({
1809
1162
  message: 'No payment method selected.',
1810
1163
  errorCode: ComponentError.ComponentErrorCodes.VALIDATION_ERROR,
@@ -1812,9 +1165,9 @@ const ModularCheckout = class {
1812
1165
  });
1813
1166
  return;
1814
1167
  }
1815
- const isNewCard = ((_a = GooglePay$1.checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === index$1.PAYMENT_METHODS.NEW_CARD;
1816
- const isNewBankAccount = ((_b = GooglePay$1.checkoutStore.selectedPaymentMethod) === null || _b === void 0 ? void 0 : _b.type) === index$1.PAYMENT_METHODS.NEW_BANK_ACCOUNT;
1817
- const isPlaid = ((_c = GooglePay$1.checkoutStore.selectedPaymentMethod) === null || _c === void 0 ? void 0 : _c.type) === index$1.PAYMENT_METHODS.PLAID;
1168
+ const isNewCard = ((_a = checkout_store.checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === index$1.PAYMENT_METHODS.NEW_CARD;
1169
+ const isNewBankAccount = ((_b = checkout_store.checkoutStore.selectedPaymentMethod) === null || _b === void 0 ? void 0 : _b.type) === index$1.PAYMENT_METHODS.NEW_BANK_ACCOUNT;
1170
+ const isPlaid = ((_c = checkout_store.checkoutStore.selectedPaymentMethod) === null || _c === void 0 ? void 0 : _c.type) === index$1.PAYMENT_METHODS.PLAID;
1818
1171
  const shouldTokenize = isNewCard || isNewBankAccount;
1819
1172
  if (shouldTokenize) {
1820
1173
  const tokenizeResult = await this.tokenizePaymentMethod(submitCheckoutArgs);
@@ -1828,9 +1181,9 @@ const ModularCheckout = class {
1828
1181
  }
1829
1182
  }
1830
1183
  // For Plaid, perform exchange at submit time using stored public token and link token id
1831
- if (isPlaid && !GooglePay$1.checkoutStore.paymentToken) {
1832
- const publicToken = GooglePay$1.checkoutStore.plaidPublicToken;
1833
- const linkTokenId = GooglePay$1.checkoutStore.plaidLinkTokenId;
1184
+ if (isPlaid && !checkout_store.checkoutStore.paymentToken) {
1185
+ const publicToken = checkout_store.checkoutStore.plaidPublicToken;
1186
+ const linkTokenId = checkout_store.checkoutStore.plaidLinkTokenId;
1834
1187
  if (!publicToken) {
1835
1188
  this.errorEvent.emit({
1836
1189
  message: 'Missing Plaid public token. Please connect your bank.',
@@ -1840,7 +1193,7 @@ const ModularCheckout = class {
1840
1193
  return;
1841
1194
  }
1842
1195
  try {
1843
- const response = await this.plaidService.tokenizeBankAccount(GooglePay$1.checkoutStore.authToken, GooglePay$1.checkoutStore.accountId, publicToken, linkTokenId || undefined, GooglePay$1.checkoutStore.savePaymentMethod ? GooglePay$1.checkoutStore.paymentMethodGroupId : undefined);
1196
+ const response = await this.plaidService.tokenizeBankAccount(checkout_store.checkoutStore.authToken, checkout_store.checkoutStore.accountId, publicToken, linkTokenId || undefined, checkout_store.checkoutStore.savePaymentMethod ? checkout_store.checkoutStore.paymentMethodGroupId : undefined);
1844
1197
  if (response === null || response === void 0 ? void 0 : response.error) {
1845
1198
  this.errorEvent.emit({
1846
1199
  message: typeof response.error === 'string' ? response.error : response.error.message || 'Failed to tokenize bank account',
@@ -1851,7 +1204,7 @@ const ModularCheckout = class {
1851
1204
  }
1852
1205
  const paymentMethod = response === null || response === void 0 ? void 0 : response.data;
1853
1206
  const token = ((_d = paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.bank_account) === null || _d === void 0 ? void 0 : _d.token) || (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.token) || (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id);
1854
- GooglePay$1.checkoutStore.paymentToken = token;
1207
+ checkout_store.checkoutStore.paymentToken = token;
1855
1208
  }
1856
1209
  catch (err) {
1857
1210
  this.errorEvent.emit({
@@ -1870,7 +1223,7 @@ const ModularCheckout = class {
1870
1223
  });
1871
1224
  return;
1872
1225
  }
1873
- if (!GooglePay$1.checkoutStore.paymentToken) {
1226
+ if (!checkout_store.checkoutStore.paymentToken) {
1874
1227
  this.errorEvent.emit({
1875
1228
  message: 'Payment token not found.',
1876
1229
  errorCode: ComponentError.ComponentErrorCodes.TOKENIZE_ERROR,
@@ -1891,18 +1244,16 @@ const ModularCheckout = class {
1891
1244
  return index$1.PAYMENT_MODE.BNPL;
1892
1245
  case index$1.PAYMENT_METHODS.APPLE_PAY:
1893
1246
  return index$1.PAYMENT_MODE.APPLE_PAY;
1894
- case index$1.PAYMENT_METHODS.GOOGLE_PAY:
1895
- return index$1.PAYMENT_MODE.GOOGLE_PAY;
1896
1247
  default:
1897
1248
  return undefined;
1898
1249
  }
1899
1250
  };
1900
1251
  payment = {
1901
- payment_mode: mapTypeToPaymentMode((_e = GooglePay$1.checkoutStore.selectedPaymentMethod) === null || _e === void 0 ? void 0 : _e.type),
1902
- payment_token: GooglePay$1.checkoutStore.paymentToken,
1252
+ payment_mode: mapTypeToPaymentMode((_e = checkout_store.checkoutStore.selectedPaymentMethod) === null || _e === void 0 ? void 0 : _e.type),
1253
+ payment_token: checkout_store.checkoutStore.paymentToken,
1903
1254
  };
1904
1255
  if (this.preCompleteHook) {
1905
- const state = GooglePay$1.getCheckoutState();
1256
+ const state = checkout_store.getCheckoutState();
1906
1257
  try {
1907
1258
  await new Promise((resolve, reject) => {
1908
1259
  this.preCompleteHook(state, () => resolve(), () => reject());
@@ -1930,7 +1281,7 @@ const ModularCheckout = class {
1930
1281
  });
1931
1282
  }
1932
1283
  render() {
1933
- return index.h(index.Host, { key: '43f4be87e218b23251f2ccac90e0c980bf157d68' });
1284
+ return index.h(index.Host, { key: '56a003ca1e1ac4bdc1baa8f862cdb05b2d8af4b1' });
1934
1285
  }
1935
1286
  get hostEl() { return index.getElement(this); }
1936
1287
  };
@@ -2009,7 +1360,7 @@ const PlaidPaymentMethod = class {
2009
1360
  this.hasLoggedDisabledWarning = false;
2010
1361
  this.waitForStoreAndInitialize = () => {
2011
1362
  // Check if store has necessary data
2012
- if (GooglePay$1.checkoutStore.authToken && GooglePay$1.checkoutStore.accountId && GooglePay$1.checkoutStore.checkoutId) {
1363
+ if (checkout_store.checkoutStore.authToken && checkout_store.checkoutStore.accountId && checkout_store.checkoutStore.checkoutId) {
2013
1364
  this.initializePlaidLink();
2014
1365
  }
2015
1366
  else {
@@ -2068,7 +1419,7 @@ const PlaidPaymentMethod = class {
2068
1419
  this.getLinkToken = async () => {
2069
1420
  var _a, _b, _c, _d, _e;
2070
1421
  try {
2071
- if (!GooglePay$1.checkoutStore.authToken || !GooglePay$1.checkoutStore.accountId) {
1422
+ if (!checkout_store.checkoutStore.authToken || !checkout_store.checkoutStore.accountId) {
2072
1423
  this.handleError({
2073
1424
  code: PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED,
2074
1425
  message: 'Missing authentication. Please refresh the page and try again.',
@@ -2085,7 +1436,7 @@ const PlaidPaymentMethod = class {
2085
1436
  var _a;
2086
1437
  (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
2087
1438
  }, 30000); // 30 second timeout
2088
- const response = await this.plaidService.getLinkToken(GooglePay$1.checkoutStore.authToken, GooglePay$1.checkoutStore.accountId, GooglePay$1.checkoutStore.checkoutId, this.abortController.signal);
1439
+ const response = await this.plaidService.getLinkToken(checkout_store.checkoutStore.authToken, checkout_store.checkoutStore.accountId, checkout_store.checkoutStore.checkoutId, this.abortController.signal);
2089
1440
  // Clear timeout
2090
1441
  if (this.timeoutId) {
2091
1442
  clearTimeout(this.timeoutId);
@@ -2102,7 +1453,7 @@ const PlaidPaymentMethod = class {
2102
1453
  // Try to capture link token id if present in envelope
2103
1454
  this.linkTokenId = (response === null || response === void 0 ? void 0 : response.id) || ((_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.id) || null;
2104
1455
  if (this.linkTokenId) {
2105
- GooglePay$1.checkoutStore.plaidLinkTokenId = this.linkTokenId;
1456
+ checkout_store.checkoutStore.plaidLinkTokenId = this.linkTokenId;
2106
1457
  }
2107
1458
  }
2108
1459
  catch (error) {
@@ -2175,7 +1526,7 @@ const PlaidPaymentMethod = class {
2175
1526
  // Ensure the component remains selected after successful authentication
2176
1527
  if (!this.isSelected) {
2177
1528
  this.isSelected = true;
2178
- GooglePay$1.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.PLAID };
1529
+ checkout_store.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.PLAID };
2179
1530
  }
2180
1531
  // Emit success event for parent components
2181
1532
  this.plaidErrorRecovered.emit({
@@ -2184,7 +1535,7 @@ const PlaidPaymentMethod = class {
2184
1535
  severity: ComponentError.ComponentErrorSeverity.INFO
2185
1536
  });
2186
1537
  // Store public token in checkout store; exchange will be handled on submit
2187
- GooglePay$1.checkoutStore.plaidPublicToken = publicToken;
1538
+ checkout_store.checkoutStore.plaidPublicToken = publicToken;
2188
1539
  };
2189
1540
  // Exchange logic moved to Modular Checkout submit flow.
2190
1541
  this.handlePlaidExit = (err, _metadata) => {
@@ -2326,7 +1677,7 @@ const PlaidPaymentMethod = class {
2326
1677
  // Watch for store changes to sync component state
2327
1678
  this.syncWithStore = () => {
2328
1679
  var _a;
2329
- const shouldBeSelected = ((_a = GooglePay$1.checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === index$1.PAYMENT_METHODS.PLAID;
1680
+ const shouldBeSelected = ((_a = checkout_store.checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === index$1.PAYMENT_METHODS.PLAID;
2330
1681
  if (this.isSelected !== shouldBeSelected) {
2331
1682
  this.isSelected = shouldBeSelected;
2332
1683
  }
@@ -2335,8 +1686,8 @@ const PlaidPaymentMethod = class {
2335
1686
  onSelectionChange(newValue) {
2336
1687
  var _a;
2337
1688
  // Ensure store is updated when component selection changes
2338
- if (newValue && ((_a = GooglePay$1.checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) !== index$1.PAYMENT_METHODS.PLAID) {
2339
- GooglePay$1.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.PLAID };
1689
+ if (newValue && ((_a = checkout_store.checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) !== index$1.PAYMENT_METHODS.PLAID) {
1690
+ checkout_store.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.PLAID };
2340
1691
  }
2341
1692
  // Auto-start Plaid flow when selected and ready
2342
1693
  if (newValue &&
@@ -2368,7 +1719,7 @@ const PlaidPaymentMethod = class {
2368
1719
  componentWillLoad() {
2369
1720
  var _a;
2370
1721
  // Initialize selection state based on store
2371
- this.isSelected = ((_a = GooglePay$1.checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === index$1.PAYMENT_METHODS.PLAID;
1722
+ this.isSelected = ((_a = checkout_store.checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === index$1.PAYMENT_METHODS.PLAID;
2372
1723
  }
2373
1724
  async resolvePaymentMethod() {
2374
1725
  if (!this.publicToken) {
@@ -2385,13 +1736,13 @@ const PlaidPaymentMethod = class {
2385
1736
  // Returns a usable payment method token for checkout completion.
2386
1737
  // Will perform the backend exchange if the token is not yet present in the store.
2387
1738
  async getPaymentToken() {
2388
- return GooglePay$1.checkoutStore.paymentToken;
1739
+ return checkout_store.checkoutStore.paymentToken;
2389
1740
  }
2390
1741
  async handleSelectionClick() {
2391
1742
  // Update local selection state
2392
1743
  this.isSelected = true;
2393
1744
  // Update store selection
2394
- GooglePay$1.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.PLAID };
1745
+ checkout_store.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.PLAID };
2395
1746
  // If there's an error, clear it and try to initialize again
2396
1747
  if (this.error) {
2397
1748
  this.clearError();
@@ -2407,7 +1758,7 @@ const PlaidPaymentMethod = class {
2407
1758
  async setSelected(selected) {
2408
1759
  this.isSelected = selected;
2409
1760
  if (selected) {
2410
- GooglePay$1.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.PLAID };
1761
+ checkout_store.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.PLAID };
2411
1762
  }
2412
1763
  }
2413
1764
  // Method to check if component is currently selected
@@ -2456,7 +1807,7 @@ const PlaidPaymentMethod = class {
2456
1807
  }
2457
1808
  componentDidLoad() {
2458
1809
  // Set up store change listener to keep component in sync
2459
- const unsubscribe = GooglePay$1.onChange('selectedPaymentMethod', this.syncWithStore);
1810
+ const unsubscribe = checkout_store.onChange('selectedPaymentMethod', this.syncWithStore);
2460
1811
  // Store unsubscribe function for cleanup
2461
1812
  this.unsubscribeFromStore = unsubscribe;
2462
1813
  }
@@ -2475,7 +1826,7 @@ const PlaidPaymentMethod = class {
2475
1826
  }
2476
1827
  render() {
2477
1828
  // Only allow use if enabled in checkout settings
2478
- if (GooglePay$1.checkoutStore.bankAccountVerification !== true) {
1829
+ if (checkout_store.checkoutStore.bankAccountVerification !== true) {
2479
1830
  if (!this.hasLoggedDisabledWarning) {
2480
1831
  // Log once per component lifecycle
2481
1832
  console.warn('[PlaidPaymentMethod] bank_account_verification is disabled. Component will not render.');
@@ -2526,36 +1877,36 @@ const SavedPaymentMethods = class {
2526
1877
  index.registerInstance(this, hostRef);
2527
1878
  this.onPaymentMethodOptionClick = (paymentMethod) => (e) => {
2528
1879
  e.preventDefault();
2529
- GooglePay$1.checkoutStore.selectedPaymentMethod = { id: paymentMethod.id, type: paymentMethod.type };
2530
- GooglePay$1.checkoutStore.paymentToken = paymentMethod.id;
1880
+ checkout_store.checkoutStore.selectedPaymentMethod = { id: paymentMethod.id, type: paymentMethod.type };
1881
+ checkout_store.checkoutStore.paymentToken = paymentMethod.id;
2531
1882
  };
2532
1883
  this.isAllowedPaymentMethod = (paymentMethodType) => {
2533
1884
  const isCard = paymentMethodType === index$1.PAYMENT_METHODS.SAVED_CARD;
2534
1885
  const isBankAccount = paymentMethodType === index$1.PAYMENT_METHODS.SAVED_BANK_ACCOUNT;
2535
- if (isCard && GooglePay$1.checkoutStore.disableCreditCard) {
1886
+ if (isCard && checkout_store.checkoutStore.disableCreditCard) {
2536
1887
  return false;
2537
1888
  }
2538
- if (isBankAccount && GooglePay$1.checkoutStore.disableBankAccount) {
1889
+ if (isBankAccount && checkout_store.checkoutStore.disableBankAccount) {
2539
1890
  return false;
2540
1891
  }
2541
1892
  return true;
2542
1893
  };
2543
1894
  }
2544
1895
  componentWillLoad() {
2545
- if (!GooglePay$1.checkoutStore.paymentMethods.length) {
1896
+ if (!checkout_store.checkoutStore.paymentMethods.length) {
2546
1897
  console.warn('No saved payment methods available.');
2547
1898
  }
2548
- if (GooglePay$1.checkoutStore.disablePaymentMethodGroup) {
1899
+ if (checkout_store.checkoutStore.disablePaymentMethodGroup) {
2549
1900
  console.warn('Payment method group is disabled.');
2550
1901
  }
2551
1902
  }
2552
1903
  render() {
2553
- if (GooglePay$1.checkoutStore.disablePaymentMethodGroup) {
1904
+ if (checkout_store.checkoutStore.disablePaymentMethodGroup) {
2554
1905
  return null;
2555
1906
  }
2556
- return (index.h(styledHost.StyledHost, null, index.h("div", { class: "saved-payment-methods" }, GooglePay$1.checkoutStore.paymentMethods.length ? GooglePay$1.checkoutStore.paymentMethods
1907
+ return (index.h(styledHost.StyledHost, null, index.h("div", { class: "saved-payment-methods" }, checkout_store.checkoutStore.paymentMethods.length ? checkout_store.checkoutStore.paymentMethods
2557
1908
  .filter((paymentMethod) => this.isAllowedPaymentMethod(paymentMethod.type))
2558
- .map((paymentMethod) => (index.h("div", { class: "radio-list-item p-3", part: parts.radioListItem, onClick: this.onPaymentMethodOptionClick(paymentMethod) }, index.h("form-control-radio", { name: "paymentMethodType", value: paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id, checked: GooglePay$1.checkoutStore.paymentToken === (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id), label: `${paymentMethodOptionUtils.CardBrandLabels[paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.brand] || ''} *${paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.acct_last_four}` })))) : null)));
1909
+ .map((paymentMethod) => (index.h("div", { class: "radio-list-item p-3", part: parts.radioListItem, onClick: this.onPaymentMethodOptionClick(paymentMethod) }, index.h("form-control-radio", { name: "paymentMethodType", value: paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id, checked: checkout_store.checkoutStore.paymentToken === (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id), label: `${paymentMethodOptionUtils.CardBrandLabels[paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.brand] || ''} *${paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.acct_last_four}` })))) : null)));
2559
1910
  }
2560
1911
  };
2561
1912
 
@@ -2573,20 +1924,20 @@ const SezzlePaymentMethod = class {
2573
1924
  this.initializeSezzleCheckout = () => {
2574
1925
  let resolveSezzlePromise;
2575
1926
  this.sezzlePromise = new Promise((resolve) => { resolveSezzlePromise = resolve; });
2576
- const amount = Number(GooglePay$1.checkoutStore.paymentAmount);
1927
+ const amount = Number(checkout_store.checkoutStore.paymentAmount);
2577
1928
  const Checkout = window.Checkout;
2578
1929
  const checkout = new Checkout({
2579
1930
  mode: 'popup',
2580
- publicKey: GooglePay$1.checkoutStore.bnplProviderClientId,
2581
- apiMode: GooglePay$1.checkoutStore.bnplProviderMode,
2582
- apiVersion: GooglePay$1.checkoutStore.bnplProviderApiVersion,
1931
+ publicKey: checkout_store.checkoutStore.bnplProviderClientId,
1932
+ apiMode: checkout_store.checkoutStore.bnplProviderMode,
1933
+ apiVersion: checkout_store.checkoutStore.bnplProviderApiVersion,
2583
1934
  });
2584
1935
  checkout.sezzleButtonElement = this.sezzleButtonRef;
2585
1936
  checkout.init({
2586
1937
  onClick: function (event) {
2587
1938
  event.preventDefault();
2588
1939
  checkout.startCheckout({
2589
- checkout_url: GooglePay$1.checkoutStore.bnplProviderCheckoutUrl,
1940
+ checkout_url: checkout_store.checkoutStore.bnplProviderCheckoutUrl,
2590
1941
  });
2591
1942
  },
2592
1943
  onComplete: (event) => resolveSezzlePromise({ bnpl: event.data }),
@@ -2613,12 +1964,12 @@ const SezzlePaymentMethod = class {
2613
1964
  return this.sezzlePromise;
2614
1965
  }
2615
1966
  async handleSelectionClick() {
2616
- GooglePay$1.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.SEZZLE };
1967
+ checkout_store.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.SEZZLE };
2617
1968
  this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId);
2618
1969
  }
2619
1970
  render() {
2620
1971
  var _a, _b;
2621
- if (!GooglePay$1.checkoutStore.bnplEnabled) {
1972
+ if (!checkout_store.checkoutStore.bnplEnabled) {
2622
1973
  console.warn('justifi-sezzle-payment-method: BNPL is not enabled for this account.');
2623
1974
  return null;
2624
1975
  }
@@ -2628,7 +1979,6 @@ const SezzlePaymentMethod = class {
2628
1979
 
2629
1980
  exports.justifi_apple_pay = ApplePay;
2630
1981
  exports.justifi_checkout_summary = Summary;
2631
- exports.justifi_google_pay = GooglePay;
2632
1982
  exports.justifi_header = Header;
2633
1983
  exports.justifi_modular_checkout = ModularCheckout;
2634
1984
  exports.justifi_plaid_payment_method = PlaidPaymentMethod;