DragonByte Tech
Well-known member
- Affected version
- 2.3.0 RC2
This is due to the fact that the
The fix:
customer
parameter is only set if the purchase is recurring.The fix:
Diff:
Index: src/XF/Payment/Stripe.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/XF/Payment/Stripe.php b/src/XF/Payment/Stripe.php
--- a/src/XF/Payment/Stripe.php
+++ b/src/XF/Payment/Stripe.php
@@ -336,15 +336,15 @@
throw $controller->exception($controller->error("$errorPhrase $error"));
}
$params['plan'] = $plan;
+ }
- $customer = $this->getStripeCustomer($purchaseRequest, $purchase->paymentProfile, $purchase, $error);
- if (!$customer)
- {
- $errorPhrase = \XF::phrase('error_occurred_while_creating_stripe_customer:');
- throw $controller->exception($controller->error("$errorPhrase $error"));
- }
- $params['customer'] = $customer;
- }
+ $customer = $this->getStripeCustomer($purchaseRequest, $purchase->paymentProfile, $purchase, $error);
+ if (!$customer)
+ {
+ $errorPhrase = \XF::phrase('error_occurred_while_creating_stripe_customer:');
+ throw $controller->exception($controller->error("$errorPhrase $error"));
+ }
+ $params['customer'] = $customer;
return $params;
}
@@ -1170,4 +1170,4 @@
{
return ['stripe'];
}
-}
\ No newline at end of file
+}