#jiji.com

1 messages · Page 1 of 1 (latest)

tame raptorBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

grand steeple
#

hi! what it shows is what you have passed into line_items when creating the CheckoutSession.

cyan quarry
#

ok thanks I'll look into it

cyan quarry
#

array(7) { ["customer_email"]=> string(20) "robin@kaffein.agency" ["client_reference_id"]=> int(6164) ["success_url"]=> string(103) "https://merciwalter.kaffein.tech/module/wkstripepayment/processpayment?session_id={CHECKOUT_SESSION_ID}" ["cancel_url"]=> string(41) "https://merciwalter.kaffein.tech/commande" ["mode"]=> string(12) "subscription" ["subscription_data"]=> array(1) { ["items"]=> array(1) { [0]=> array(2) { ["plan"]=> string(19) "plan_P5Z4wEHKCMoLek" ["quantity"]=> int(1) } } } ["line_items"]=> array(2) { [0]=> array(5) { ["name"]=> string(30) "Récapitulatif final du panier" ["images"]=> array(1) { [0]=> string(56) "https://merciwalter.kaffein.tech/img/logo-1680767679.jpg" } ["amount"]=> float(4042) ["currency"]=> string(3) "EUR" ["quantity"]=> string(1) "1" } [1]=> array(0) { } } }

#

here's my sessionArray for createCheckoutSession

grand steeple
#

cool, so in that code you pass subscription_data[items] (which creates a Subscription for the recurring plan), and an extra line_item for a one time amount , which is indeed exactly what you see on Checkout.

#

so if you don't want that, change the code, you control this

cyan quarry
grand steeple
#

hmm, I know, you already shared that screenshot.

cyan quarry
#

that's the amount I don't want

grand steeple
#

Let's step back. You're the developer, so you wrote code to integrate with Checkout, correct? Or how is your Stripe integration built? can you show me the code you wrote to get to this point?

cyan quarry
#

I'm a developer, debugging a recurring stripe payment module prestashop developed by webkul.
However I share with you the function.

I just want to display the correct total amount to be paid, for example on capture 21.42 and not 42.84.

grand steeple
#

cool! so in that code, your variable $lineItems is how you choose what is shown on the page.

#

so if you don't want that extra "Récapitulatif final du panier" line item, you need to change that code or where it gets its information from, so that you don't add that to $line_items. Is that clear?

cyan quarry
#

do you have any idea how I can do this?

grand steeple
#

not really, this is your code and business logic and you have all the context on how it works. Not sure how I can help beyond what I've explained.

#

what the Stripe Checkout page shows is what you tell it to show, via what you pass in the API call, to the line_items parameter. It's your code that creates the information you're passing to that API call, you wrote that and you control that and need to change it.

cyan quarry
#

ok thanks