From 3cc8d80d56e8ca668a39b900e94783c88f7f7d45 Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Mon, 3 Aug 2015 14:53:59 +1200 Subject: [PATCH] CRM-16542 re-fix paypal express form in a way that reflects our code direction --- CRM/Core/Payment/PayPalImpl.php | 15 +++++++++++++++ templates/CRM/Core/BillingBlock.tpl | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Payment/PayPalImpl.php b/CRM/Core/Payment/PayPalImpl.php index 68a4b168d2..7a6f58e038 100644 --- a/CRM/Core/Payment/PayPalImpl.php +++ b/CRM/Core/Payment/PayPalImpl.php @@ -936,6 +936,21 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment { return $result; } + /** + * Get array of fields that should be displayed on the payment form. + * + * @return array + * @throws CiviCRM_API3_Exception + */ + public function getPaymentFormFields() { + if ($this->_processorName == ts('PayPal Pro')) { + return $this->getCreditCardFormFields(); + } + else { + return array(); + } + } + /** * Map the paypal params to CiviCRM params using a field map. * diff --git a/templates/CRM/Core/BillingBlock.tpl b/templates/CRM/Core/BillingBlock.tpl index 5e09486d53..b86021d656 100644 --- a/templates/CRM/Core/BillingBlock.tpl +++ b/templates/CRM/Core/BillingBlock.tpl @@ -25,7 +25,7 @@ *} {crmRegion name="billing-block"}
- {if $paymentFields|@count && (!$form.$expressButtonName || $paymentProcessor.payment_processor_type EQ 'PayPal')} + {if $paymentFields|@count}
{$paymentTypeLabel} -- 2.25.1