Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue of validation #2548

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @sarfarazbheda, Thank you for the PR. We appreciate your contribution to the plugin.
After reviewing your changes, I noticed that the onClick event has been applied to all PaymentMethods. While your approach is commendable, we need to ensure that this event is only triggered for specific PaymentMethods, such as ApplePay, GooglePay, etc.
I would kindly request that you refactor the PR to include it only for the necessary PaymentMethods or else we can handle the refactoring within our team's availability.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have checked with all payment methods and working fine. You can test with different methods to confirm.

Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,13 @@ define(
onChange: function (state) {
self.isPlaceOrderAllowed(state.isValid);
},
onClick: function(resolve, reject) {
if (self.validate()) {
resolve();
} else {
reject();
}
},
});

return configuration;
Expand Down
Loading