#carte-dev-hire
1 messages · Page 1 of 1 (latest)
If you're looking to hire a developer I'd suggest looking at sites like Upwork or looking into some of the options listed in our expert services page (https://stripe.com/partners/expert-services)
Okay cool. Thanks for your prompt response. Can you also answer these questions below?
-
We would like to know how to pass out the information from our php shopping cart to stripe credit card form.
-
We would like to know how to pass out the information from php shopping cart to stripe check out.
We appreciate your time, attention and support.
Can you tell me a bit more about what you are trying to do? What information are you trying to pass to Stripe?
From the php shopping cart I am trying to pass the price of the product & quantity to Stripe
Have you created much of this custom Checkout page yourself at the moment? You may find this guide helpful for seeing how to build your own page and how to set the price https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
Yes I have created much of this checkout webpage and it’s working fine. Just need to grasp how to pass along the quantity and price information of the product to Stripe credit card html form for submission.
It seems this link you have shared has very useful info.
PayPal has been integrated to our php shopping cart but what it’s interesting is: PayPal takes the pricing and quantity of the product directly from the php shopping cart and not from the database of the website. Is it possible doing the same with Stripe?
If you are using that flow, you will likely only be passing the total amount to Stripe which you can do during the call to create your PaymentIntent for the order https://stripe.com/docs/api/payment_intents/create#create_payment_intent-amount
Thanks for the follow up.
how much to charge on the server side isnt pre defined as an integer, that comes from the shopping cart that’s the issue.
I need Stripe sees the “pricing”the total value from the php shopping cart in the same way PayPal code does it. Thats my issue
All the Stripe examples I have seen so far the amount has already been defined.
@bright solstice I'm sorry I don't really understand what you are describing either right now and what's blocking you. If you want a "cart" the way Paypal does it you likely should be using Stripe Checkout instead: https://stripe.com/docs/payments/checkout or Payment Links https://stripe.com/payments/payment-links
i just need stripe server side gets the pricing and quantity from the site php shopping cart so the customer can fill out the form & checkout within the site’s own domain.
Both checkout and payment links from stripe are mostly used when you already set up the price on the stripe application server side. right?
I'm really sorry I don't follow you and what's blocking you unfortunately at this point
If you do your own cart/pricing then you would pass the amount on PaymentIntent creation or update as documented in https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements which my colleague shared earlier
Okay following the link you shared
we can see
$stripe->paymentIntents->create(
[
'amount' => 1099,
'currency' => 'eur',
'automatic_payment_methods' => ['enabled' => true],
]
);
but the 'amount' in our case comes from the shopping cart which we dont know since we have multiple products.
but you do know
it's a shopping cart, you know what's in that cart, it's your own code/implementation
so you should be able to go through everything in the card and sum the total amount
The shopping is working good. i am just trying to understand how stripe gets the info when its not predefined on the stripe server side.
maybe I should replace that piece of code 'amount' => 1099, for 'amount'=> Total,
We don't get any info, we don't have a shopping cart API at all. So really you, as the developer, are passing that information and we charge the total amount, without any cart/line items/information, beyond the total amount
and yes you likely want to pass the total from a variable where you do the math for your whole cart!
Cool. I appreciate in depth your follow up. Would you mind saying which variable would be for php? I have tried so far 'amount'=> Total, in Stripe but it crashed.
there's no variable in PHP really
First variables in PHP start with $ so that would never work, but also, you have to, as the developer, do the whole math of summing up all the amounts
Unfortunately I can't tell you how to write this, this is completely specific to your own code managing the cart.
I think you should consider hiring a freelancer to build this for you instead
ok