Validation on paypal button version 2.1.102
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to add validation to an old integration that uses the paypal button version 2.1.102
The integration supports validation on button render, but not on onClick.
I have change the validation and onclick methods so that I have the actions in the onclick, but once enabled the validation is ignored.
...
onClick: function(e) {
var isValid = $('#billing-form').validate().form();
if (!isValid) {
paypalActions.disable();
} else {
paypalActions.enable();
}
},
validate: function(actions) {
actions.disable();
paypalActions = actions;
}
And the button is rendered with this script:
paypal.Button.render(configCYP,'#paypal-button-container');
where configCYP contains all the configurations + the onClick and validate methods.
I saw that newer version have the options to restrict and resolve in the actions, but in this version I only have enable and disable.
Has anyone manage to make the validation work onClick() ?
Regards
- Labels:
-
PayPal Buttons
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- donate button not working on mobile in Merchant Products and Services Archives
- Can anyone tell me why my button shows 4 of the same item? in Merchant Products and Services Archives
- Paypal page not opening on a website made with Incomedia Website X5 evo in Merchant Products and Services Archives
- Why the most simple way of ordering is not functioning any longer? in Business Tools Archives