#Wilcalaf-pi-terminal
1 messages · Page 1 of 1 (latest)
And can you share the code that's returning the error?
$this->stripe->paymentIntents->create([
'amount' => intVal($amount * 100),
'currency' => $this->currency,
'payment_method_types' => ['card_present'],
'capture_method' => 'manual',
], [
'stripe_account' => $this->stripe_account_id
]);
this i use to create
then i collect and process on front
and then i use this to try to capture
$response = $this->stripe->paymentIntents->capture($payment_intent);
where $payment_intent is the ID i got from the creation
Yeah, you need to pass the stripe_account parameter to the capture call:
$stripe->paymentIntents->capture(
'pi_1EUmyp2x6R10KRrhz0WmtMnF',
[], [
'stripe_account' => $this->stripe_account_id
]);
Yeah, the 2nd argument is for any parameters (like, amount_to_capture if you want a partial capture): https://stripe.com/docs/api/payment_intents/capture?lang=php
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.