}
$processorObject = new $paymentClass(!empty($processor['is_test']) ? 'test' : 'live', $processor);
- if (!$force && !$processorObject->checkConfig()) {
+ if (!$force && $processorObject->checkConfig()) {
$processorObject = NULL;
}
else {
$processorObject->setPaymentProcessor($processor);
}
+ $this->cache[$id] = $processorObject;
}
- $this->cache[$id] = $processorObject;
+
return $this->cache[$id];
}
'billing_mode' => 1,
), $params);
- $result = $this->callAPISuccess('payment_processor', 'create', $params);
+ $result = $this->callAPISuccess('PaymentProcessor', 'create', $params);
return $result['id'];
}