#u2ojr2-billing_details-stripejs
1 messages · Page 1 of 1 (latest)
ah sorry I missed following up here
can you make sure a/ your new code is running by putting a custom console.log() before your confirmPayment()
and b/ mind sharing an API request for that /v1/payment_intents/:id/confirm request, where you're passing billing_details but not seeing it
// retrieve JSON from POST body
$jsonStr = file_get_contents('php://input');
$jsonObj = json_decode($jsonStr);
// Create a PaymentIntent with amount and currency
$paymentIntent = \Stripe\PaymentIntent::create(
[
'amount' => calculateOrderAmount($jsonObj->items),
'currency' => 'eur',
'automatic_payment_methods' => [
'enabled' => true,
],
'description' => 'test@test.com | Product: test x1',
]
);
$output = [
'clientSecret' => $paymentIntent->client_secret,
];
echo json_encode($output);
} catch (Error $e) {
http_response_code(500);
echo json_encode(['error' => $e->getMessage()]);
}```
This is my paymentIntent create
where do I need to trigger a confirm request?
stepping away, a colleague is jumping in to help you out!