Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7
-
Fix Version/s: 4.7
-
Component/s: CiviContribute
-
Labels:
-
Documentation Required?:None
-
Funding Source:Core Team Funds
Description
Validation error for billing fields on the following processors
- Paypal Standard - This is due to `billing_fields` inserted in $form->_paymentFields with array_merge() happening here which leads to formRule error message of required field for all the billing_fields even if they are not displayed on the page. I tried to fix these with https://github.com/civicrm/civicrm-core/pull/6758, but I think, it opposes the proposed workflow.
- Paypal Pro, Paypal Express :- This happens if Paypal expressbutton is clicked for these processors. It arises due to the change of expressButtonName after the snippet is loaded with onchange event.
Steps to reproduce-
1) Go to the Online Contribution Page
2) Select payment processor as test processor
3) Change the selection to radio for Paypal Express/ Paypal Pro now.
4) The loaded js snippet changes the expressButtonName from `qf_Main_upload_express` to `qf_Payment_upload_express`.
5) Click on the expressButton for paypal -> Validation errors for billing fields
On navigating a little I found addPaypalExpressCode() takes $form (which is Main Contribution Form when the page is loaded) and gets the buttonName as `qf_Main_upload_express`. This changes to `qf_Payment_upload_express`(as the $form changes to CRM_Financial_Form_PaypalExpress) when the snippet loads with toggling b/w the processors.
With these change of buttonNames empty errors are not returned and formrule executes to validate the mandatory fields.