#jose-stripe-help

1 messages · Page 1 of 1 (latest)

small meadow
vital loom
#

@summer reef stripe doesn't work like paypal. The "links" is for making a one off link you give to someone which has hard coded what they buying. Like sending someone an invoice. For integrating with a website shopping cart you have to use their sessions API. A little more involved/complicated.
https://stripe.com/docs/payments/online-payments

small meadow
summer reef
#

Do I have to generate a payment link for each person who buys?

vital loom
#

Depending on what you using for your backend (im just another website like you, im using php) you have to create a "session" which is just an object variable with the details of the transaction using their API you have to install on your server. The API on your server will generate the redirect link you forward you customer to that is the payment/checkout page.

#

And, yes you would create one of those each time someone clicks the [Payment] button on your webpage.

#

Unless you use one of the other options, im only talking about one way.

small meadow
#

My way means you create one link to buy Price A and then you share that link with all your customers

#

it's closer to what Paypal does, though not identical

summer reef
small meadow
#

Then if you need something specific per customer, the Checkout Session approach that @vital loom mentioned is the right one, but it needs server-side code

summer reef
#

How can I include the stripe PHP API in my website so that I can use commands like "\Stripe\PaymentIntent::create" ? stripe's PHP source includes hundreds of files and if I do "include stripe/Stripe.php" I get a "500 internal server error"

small meadow
#

@summer reef are you a PHP developer? If not, you can't really do that, you'll need to hire a developer to do this for you

summer reef
#

In help docs say:
"require 'vendor/autoload.php';"
but i no have this file

small meadow
summer reef
#

I already did it, maybe due to some error it did not download all the files, I will try to do it again

vital loom
#

If PHP is what you want to use (there are other languages supported) you can either use composer to install everything you need, or you can download a zip off their github with all the PHP pages needed. You then just add a include_once() to your page to use their API.

summer reef
#

Now it downloads correctly, which is strange

#

I have another problem:

No valid payment method types for this Payment Intent. Please ensure that you have activated payment methods compatible with your chosen currency in your dashboard (https://dashboard.stripe.com/settings/payment_methods) or specify payment_method_types

And i aldeady have allowed payment method

small meadow
#

Hard to say without more details unfortunately. Likely due to your account not being ready/activated. Do you have an exact request id?

summer reef
#

My account has been active for months, I have already received several payments

#

POST /v1/payment_intents
req_kc2u3QFRuxxGBt
22/3/22 0:09:54

#

And other ID

#

req_kNdIxxmSFlCFPk

#

{
"amount": "1",
"currency": "EUR",
"automatic_payment_methods": {
"enabled": "true"
}
}

small meadow
#

Can you try a second time? I see the same thing on my end where card payments are properly enabled

#

ah wait you're using PaymentIntents, I thought you wanted to use Payment Links?

summer reef
small meadow
#

yeah I think you're just going too fast and using the wrong API

#

@summer reef once you switch to Checkout or PaymentIntent it will work