Skip to content

Commit

Permalink
OJS Adjustments (#55)
Browse files Browse the repository at this point in the history
* remove input selector

* 0.0.23

* update onCheckoutStarted callback
  • Loading branch information
zeyarpaing authored Oct 17, 2024
1 parent 115efef commit 0a04e69
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint:fix": "next lint --fix"
},
"dependencies": {
"@getopenpay/openpay-js-react": "0.0.19-alpha.2de60c2",
"@getopenpay/openpay-js-react": "file:..",
"@stripe/stripe-js": "^4.3.0",
"classnames": "^2.5.1",
"fraction.js": "^4.3.7",
Expand Down
1 change: 1 addition & 0 deletions example/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ const Form: FC<FormProps> = (props) => {
onCheckoutSuccess={onCheckoutSuccess}
onSetupPaymentMethodSuccess={onSetupPaymentMethodSuccess}
onCheckoutError={onCheckoutError}
baseUrl={props.baseUrl}
>
{({ submit, applePay, googlePay, stripeLink, loaded }) => (
<FormWrapper error={validationErrors}>
Expand Down
4 changes: 3 additions & 1 deletion lib/components/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ const ElementsForm: FC<ElementsFormProps> = (props) => {
} else if (eventType === EventType.enum.TOKENIZE_STARTED) {
console.log('[form] Tokenization started');
setPreventClose(true);

} else if (eventType === EventType.enum.CHECKOUT_STARTED) {
// Firing onCheckoutStarted here to correct the behavior for separate elements
// This has a delay issue with combined elements
if (onCheckoutStarted) onCheckoutStarted();
} else if (eventType === EventType.enum.PAYMENT_FLOW_STARTED) {
if (!extraData) {
Expand Down

0 comments on commit 0a04e69

Please sign in to comment.