- CRM_Core_Error::fatal(ts("%1 processor doesn't support updating subscription billing details.",
- array(1 => $this->_paymentProcessor['object']->_processorName)
+ throw new CRM_Core_Exception(ts("%1 processor doesn't support updating subscription billing details.",
+ [1 => $this->_paymentProcessor['title']]
* true if no errors, else array of errors
*/
public static function formRule($fields, $files, $self) {
* true if no errors, else array of errors
*/
public static function formRule($fields, $files, $self) {
CRM_Core_Form::validateMandatoryFields($self->_fields, $fields, $errors);
// validate the payment instrument values (e.g. credit card number)
CRM_Core_Form::validateMandatoryFields($self->_fields, $fields, $errors);
// validate the payment instrument values (e.g. credit card number)
foreach ($params as $key => $val) {
$key = str_replace('billing_', '', $key);
list($key) = explode('-', $key);
foreach ($params as $key => $val) {
$key = str_replace('billing_', '', $key);
list($key) = explode('-', $key);
$processorParams['country'] = CRM_Core_PseudoConstant::country($params["billing_country_id-{$this->_bltID}"], FALSE);
$processorParams['month'] = $processorParams['credit_card_exp_date']['M'];
$processorParams['year'] = $processorParams['credit_card_exp_date']['Y'];
$processorParams['country'] = CRM_Core_PseudoConstant::country($params["billing_country_id-{$this->_bltID}"], FALSE);
$processorParams['month'] = $processorParams['credit_card_exp_date']['M'];
$processorParams['year'] = $processorParams['credit_card_exp_date']['Y'];
$processorParams['amount'] = $this->_subscriptionDetails->amount;
$updateSubscription = $this->_paymentProcessor['object']->updateSubscriptionBillingInfo($message, $processorParams);
if (is_a($updateSubscription, 'CRM_Core_Error')) {
$processorParams['amount'] = $this->_subscriptionDetails->amount;
$updateSubscription = $this->_paymentProcessor['object']->updateSubscriptionBillingInfo($message, $processorParams);
if (is_a($updateSubscription, 'CRM_Core_Error')) {
// format new address for display
$addressParts = array("street_address", "city", "postal_code", "state_province", "country");
foreach ($addressParts as $part) {
// format new address for display
$addressParts = array("street_address", "city", "postal_code", "state_province", "country");
foreach ($addressParts as $part) {
$addressParts = array("street_address", "city", "postal_code", "state_province", "country");
foreach ($addressParts as $part) {
$key = "{$part}-{$this->_bltID}";
$addressParts = array("street_address", "city", "postal_code", "state_province", "country");
foreach ($addressParts as $part) {
$key = "{$part}-{$this->_bltID}";