Commit 459131e8 authored by mattwire's avatar mattwire
Browse files

Set pre-approval params for paymentMethodID (used for recurring payments) as...

Set pre-approval params for paymentMethodID (used for recurring payments) as well as paymentIntentID
parent 8d39523b
......@@ -370,10 +370,9 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
* @return array
*/
public function doPreApproval(&$params) {
$paymentIntentID = CRM_Utils_Request::retrieve('paymentIntentID', 'String');
if (!empty($paymentIntentID)) {
return ['pre_approval_parameters' => ['paymentIntentID' => $paymentIntentID]];
}
$preApprovalParams['paymentIntentID'] = CRM_Utils_Request::retrieve('paymentIntentID', 'String');
$preApprovalParams['paymentMethodID'] = CRM_Utils_Request::retrieve('paymentMethodID', 'String');
return ['pre_approval_parameters' => $preApprovalParams];
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment