Skip to content

Commit

Permalink
Merge pull request #20384 from mattwire/deprecateddopayment
Browse files Browse the repository at this point in the history
If paymentprocessor still uses doTransferCheckout/doDirectPayment trigger deprecated function warning
  • Loading branch information
eileenmcnaughton authored May 23, 2021
2 parents 8e1366e + 0fb605e commit 3593fea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CRM/Core/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -1378,13 +1378,15 @@ public function doPayment(&$params, $component = 'contribute') {
}

if ($this->_paymentProcessor['billing_mode'] == 4) {
CRM_Core_Error::deprecatedFunctionWarning('doPayment', 'doTransferCheckout');
$result = $this->doTransferCheckout($params, $component);
if (is_array($result) && !isset($result['payment_status_id'])) {
$result['payment_status_id'] = array_search('Pending', $statuses);
$result['payment_status'] = 'Pending';
}
}
else {
CRM_Core_Error::deprecatedFunctionWarning('doPayment', 'doDirectPayment');
$result = $this->doDirectPayment($params, $component);
if (is_array($result) && !isset($result['payment_status_id'])) {
if (!empty($params['is_recur'])) {
Expand Down

0 comments on commit 3593fea

Please sign in to comment.