#jignesh_13529

1 messages · Page 1 of 1 (latest)

real heathBOT
west ruin
#

That looks like some JSON parsing error. Have you tried downloaded the example code and run exactly its file?

paper thorn
#

yes i tried and follow same exactly instruction also

west ruin
#

Open create.php

#

on the line you have

$stripe->paymentIntent->create([

please change it to

$stripe->paymentIntents->create([
#

Note the s

#

Sorry, we have flagged and it should be fixed soon

paper thorn
#

thanks its work. can i asked you one more question ?

west ruin
#

Sure

paper thorn
#

I dont know which payment method good for our requirement.

We want to collect final grand total payment and get transaction id and redirect to success url or fail url. We dont want to transfer items to stripe checkout which best one for us ?

west ruin
#

What do you mean by transfer items to Stripe Checkout?

paper thorn
#

i mean products name

west ruin
#

Sorry don't really follow the question. Could you elaborate on what do you mean by transfer products name?

paper thorn
#

Forgot about product name which one suitable for me please let me know

#

in php

#

I just need button that redirect me to stripe

west ruin
paper thorn
#

'line_items' => [[
# Provide the exact Price ID (e.g. pr_1234) of the product you want to sell
'price' => '{{PRICE_ID}}',
'quantity' => 1,
]],

there we have to provide price and quantity for each item right ?

west ruin
#

Yes correct

paper thorn
#

ok

#

if i dont want to send price and qty separately i just want to send single grand total figure then possible ?

west ruin
#

No you need to specify price and quantity. You can give quantity = 1, and price as your grand total

paper thorn
#

<b>Fatal error</b>: Uncaught (Status 400) (Request req_15z7VgVLForvIs) The price parameter should be the ID of a price object, rather than the literal numerical price. Please see https://stripe.com/docs/billing/prices-guide#create-prices for more information about how to set up price objects.
thrown in <b>K:\xampp\htdocs\stripe-sample-code2\vendor\stripe\stripe-php\lib\Exception\ApiErrorException.php</b> on line <b>38</b><br />

Model your business on Stripe with products and prices.

#

getting error

west ruin
#

Yes, it expects an ID