if (!empty($this->_paymentProcessor) && $this->_paymentProcessor['object']->supports('preApproval')) {
$preApprovalParams = $this->_paymentProcessor['object']->getPreApprovalDetails($this->get('pre_approval_parameters'));
$this->_params = array_merge($this->_params, $preApprovalParams);
- }
- // We may have fetched some billing details from the getPreApprovalDetails function so we
- // want to ensure we set this after that function has been called.
- CRM_Core_Payment_Form::mapParams($this->_bltID, $this->_params, $this->_params, FALSE);
+ // We may have fetched some billing details from the getPreApprovalDetails function so we
+ // want to ensure we set this after that function has been called.
+ CRM_Core_Payment_Form::mapParams($this->_bltID, $preApprovalParams, $this->_params, FALSE);
+ }
$this->_params['is_pay_later'] = $this->get('is_pay_later');
$this->assign('is_pay_later', $this->_params['is_pay_later']);