From 5f0c586e764a41ad5a1f360c6c8383404fb092a2 Mon Sep 17 00:00:00 2001 From: Sunil Pawar Date: Tue, 2 Jan 2018 00:10:48 +0530 Subject: [PATCH] corrected syntax --- CRM/Core/Payment/PayPalImpl.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/CRM/Core/Payment/PayPalImpl.php b/CRM/Core/Payment/PayPalImpl.php index b6f255db86..23ef6f1a24 100644 --- a/CRM/Core/Payment/PayPalImpl.php +++ b/CRM/Core/Payment/PayPalImpl.php @@ -139,13 +139,15 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment { protected function addPaypalExpressCode(&$form) { // @todo use $this->isBackOffice() instead, test. if (empty($form->isBackOffice)) { - /* - if payment method selected using ajax call then form object is of 'CRM_Financial_Form_Payment', - instead of 'CRM_Contribute_Form_Contribution_Main' so it generate wrong button name - and then clicking on express button it redirect to confirm screen rather than PayPal Express form - */ + + /** + * if payment method selected using ajax call then form object is of 'CRM_Financial_Form_Payment', + * instead of 'CRM_Contribute_Form_Contribution_Main' so it generate wrong button name + * and then clicking on express button it redirect to confirm screen rather than PayPal Express form + */ + if ('CRM_Financial_Form_Payment' == get_class($form) && $form->_formName) { - $form->_expressButtonName = '_qf_'.$form->_formName.'_upload_express'; + $form->_expressButtonName = '_qf_' . $form->_formName . '_upload_express'; } else { $form->_expressButtonName = $form->getButtonName('upload', 'express'); -- 2.25.1