* @return CRM_Core_Payment
* @throws \CRM_Core_Exception
*/
- public static function &singleton($mode = 'test', &$paymentProcessor, &$paymentForm = NULL, $force = FALSE) {
+ public static function singleton($mode = 'test', &$paymentProcessor, &$paymentForm = NULL, $force = FALSE) {
// make sure paymentProcessor is not empty
// CRM-7424
if (empty($paymentProcessor)) {
}
}
+ /**
+ * Getter for the payment processor.
+ *
+ * The payment processor array is based on the civicrm_payment_processor table entry.
+ *
+ * @return array
+ * Payment processor array.
+ */
+ public function getPaymentProcessor() {
+ return $this->_paymentProcessor;
+ }
+
+ /**
+ * Setter for the payment processor.
+ *
+ * @param array $processor
+ */
+ public function setPaymentProcessor($processor) {
+ $this->_paymentProcessor = $processor;
+ }
+
/**
* Setter for the payment form that wants to use the processor.
*
}
else {
// Legacy or extension as module instance
- if (empty($paymentClass)) {
- $paymentClass = 'CRM_Core_' . $dao->class_name;
-
- }
+ $paymentClass = 'CRM_Core_' . $dao->class_name;
}
$processorInstance = Civi\Payment\System::singleton()->getById($dao->processor_id);