+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018 |
+ | Copyright CiviCRM LLC (c) 2004-2019 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
return FALSE;
}
+ /**
+ * Does this processor support updating billing info for recurring contributions through code.
+ *
+ * If the processor returns true then it must be possible to update billing info from within CiviCRM
+ * that will be updated at the payment processor.
+ *
+ * @return bool
+ */
+ protected function supportsUpdateSubscriptionBillingInfo() {
+ return method_exists(CRM_Utils_System::getClassName($this), 'updateSubscriptionBillingInfo');
+ }
+
/**
* Can recurring contributions be set against pledges.
*
* @return array
*/
public function getEditableRecurringScheduleFields() {
- if (method_exists($this, 'changeSubscriptionAmount')) {
+ if ($this->supports('changeSubscriptionAmount')) {
return array('amount');
}
}
'class' => 'creditcard',
),
'is_required' => TRUE,
+ // 'description' => '16 digit card number', // If you enable a description field it will be shown below the field on the form
),
'cvv2' => array(
'htmlType' => 'text',
'rule_parameters' => TRUE,
),
),
+ 'extra' => ['class' => 'crm-form-select'],
),
'credit_card_type' => array(
'htmlType' => 'select',
$extension_instance_found = TRUE;
}
+ // Call IPN postIPNProcess hook to allow for custom processing of IPN data.
+ $IPNParams = array_merge($_GET, $_REQUEST);
+ CRM_Utils_Hook::postIPNProcess($IPNParams);
if (!$extension_instance_found) {
$message = "No extension instances of the '%1' payment processor were found.<br />" .
"%2 method is unsupported in legacy payment processors.";
case 'billing':
//in notify mode don't return the update billing url
- if (!$this->isSupported('updateSubscriptionBillingInfo')) {
+ if (!$this->supports('updateSubscriptionBillingInfo')) {
return NULL;
}
$url = 'civicrm/contribute/updatebilling';
}
// Else login URL
- if ($this->isSupported('accountLoginURL')) {
+ if ($this->supports('accountLoginURL')) {
return $this->accountLoginURL();
}
return FALSE;
}
+ /**
+ * Does this processor support changing the amount for recurring contributions through code.
+ *
+ * If the processor returns true then it must be possible to update the amount from within CiviCRM
+ * that will be updated at the payment processor.
+ *
+ * @return bool
+ */
+ protected function supportsChangeSubscriptionAmount() {
+ return method_exists(CRM_Utils_System::getClassName($this), 'changeSubscriptionAmount');
+ }
+
/**
* Checks if payment processor supports recurring contributions
*
return FALSE;
}
+ /**
+ * Checks if payment processor supports an account login URL
+ * TODO: This is checked by self::subscriptionURL but is only used if no entityID is found.
+ * TODO: It is implemented by AuthorizeNET, any others?
+ *
+ * @return bool
+ */
+ protected function supportsAccountLoginURL() {
+ return method_exists(CRM_Utils_System::getClassName($this), 'accountLoginURL');
+ }
+
/**
* Should a receipt be sent out for a pending payment.
*