#carte-dev-hire

1 messages · Page 1 of 1 (latest)

timid horizon
bright solstice
#

Okay cool. Thanks for your prompt response. Can you also answer these questions below?

  1. We would like to know how to pass out the information from our php shopping cart to stripe credit card form.

  2. 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.

silk wolf
#

Can you tell me a bit more about what you are trying to do? What information are you trying to pass to Stripe?

bright solstice
#

From the php shopping cart I am trying to pass the price of the product & quantity to Stripe

silk wolf
bright solstice
#

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?

silk wolf
bright solstice
#

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.

stone sparrow
bright solstice
#

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?

stone sparrow
#

I'm really sorry I don't follow you and what's blocking you unfortunately at this point

bright solstice
#

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.

stone sparrow
#

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

bright solstice
#

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,

stone sparrow
#

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!

bright solstice
#

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.

stone sparrow
#

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

bright solstice
#

ok