From 20e12259b7d8b4596932521f9917ef3a14630dc7 Mon Sep 17 00:00:00 2001 From: Jitendra Purohit <jitendra@fuzion.co.nz> Date: Mon, 26 Feb 2018 08:41:08 +0530 Subject: [PATCH] Error on recurring donations Received unknown parameter: name --- CRM/Core/Payment/Stripe.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Payment/Stripe.php b/CRM/Core/Payment/Stripe.php index 9ca4fab6..a13c8173 100644 --- a/CRM/Core/Payment/Stripe.php +++ b/CRM/Core/Payment/Stripe.php @@ -745,11 +745,15 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment { if (!isset($stripe_plan_query)) { $formatted_amount = number_format(($amount / 100), 2); + $product = \Stripe\Product::create(array( + "name" => "CiviCRM {$membership_name} every {$frequency_interval} {$frequency}(s) {$formatted_amount}{$currency}{$mode_tag}", + "type" => "service" + )); // Create a new Plan. $stripe_plan = array( 'amount' => $amount, 'interval' => $frequency, - 'name' => "CiviCRM {$membership_name} every {$frequency_interval} {$frequency}(s) {$formatted_amount}{$currency}{$mode_tag}", + 'product' => $product->id, 'currency' => $currency, 'id' => $plan_id, 'interval_count' => $frequency_interval, -- GitLab