CRM-16542 re-fix paypal express form in a way that reflects our code direction
authoreileenmcnaugton <eileen@fuzion.co.nz>
Mon, 3 Aug 2015 02:53:59 +0000 (14:53 +1200)
committereileenmcnaugton <eileen@fuzion.co.nz>
Mon, 3 Aug 2015 02:53:59 +0000 (14:53 +1200)
CRM/Core/Payment/PayPalImpl.php
templates/CRM/Core/BillingBlock.tpl

index 68a4b168d2ed588baecfcda90a1425babbd22819..7a6f58e0381db703828c92303a2a49925ae5d15f 100644 (file)
@@ -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.
    *
index 5e09486d53553b5ea1e576103484b1875d926d8f..b86021d6560fff56d68ac6d1ab3e128e6c17ba66 100644 (file)
@@ -25,7 +25,7 @@
 *}
 {crmRegion name="billing-block"}
 <div id="payment_information">
-  {if $paymentFields|@count && (!$form.$expressButtonName || $paymentProcessor.payment_processor_type EQ 'PayPal')}
+  {if $paymentFields|@count}
     <fieldset class="billing_mode-group {$paymentTypeName}_info-group">
       <legend>
         {$paymentTypeLabel}