RECURRING_PAYMENT_START = 'START',
RECURRING_PAYMENT_END = 'END';
+ /**
+ * @var object
+ */
protected $_paymentProcessor;
/**
*
* (Deprecated parameter but used in some messages).
*
+ * @var string
* @deprecated
*
- * @var string
*/
public $_processorName;
return TRUE;
}
+ /**
+ * Does this payment processor support refund?
+ *
+ * @return bool
+ */
+ public function supportsRefund() {
+ return FALSE;
+ }
+
/**
* Should the first payment date be configurable when setting up back office recurring payments.
*
case 'contributionPageRecurringHelp':
// require exactly two parameters
if (array_keys($params) == [
- 'is_recur_installments',
- 'is_email_receipt',
- ]) {
+ 'is_recur_installments',
+ 'is_email_receipt',
+ ]) {
$gotText = ts('Your recurring contribution will be processed automatically.');
if ($params['is_recur_installments']) {
$gotText .= ' ' . ts('You can specify the number of installments, or you can leave the number of installments blank if you want to make an open-ended commitment. In either case, you can choose to cancel at any time.');
if ($this->supports('changeSubscriptionAmount')) {
return ['amount'];
}
+ return [];
}
/**
* @param int $billingLocationID
*
* @return array
- * Array of metadata for address fields.
+ * Array of metadata for address fields.
*/
public function getBillingAddressFieldsMetadata($billingLocationID = NULL) {
if (!$billingLocationID) {
'title' => ts('Country'),
'cc_field' => TRUE,
'attributes' => [
- '' => ts('- select -'),
- ] + CRM_Core_PseudoConstant::country(),
+ '' => ts('- select -'),
+ ] + CRM_Core_PseudoConstant::country(),
'is_required' => TRUE,
];
return $metadata;
return $result;
}
+ /**
+ * Refunds payment
+ *
+ * Payment processors should set payment_status_id if it set the status to Refunded in case the transaction is successful
+ *
+ * @param array $params
+ *
+ * @throws \Civi\Payment\Exception\PaymentProcessorException
+ */
+ public function doRefund(&$params) {}
+
/**
* Query payment processor for details about a transaction.
*