Git Product home page Git Product logo

Comments (5)

remi-stripe avatar remi-stripe commented on August 25, 2024

@tiagocaus This looks like an integration support better directed at our support team for 1:1 help instead. You can contact them here: https://support.stripe.com/contact
To unblock you, what you want is the pi_123 which is the PaymentIntent id and then later listen to the payment_intent.succeeded Event which indicates when the payment did succeed.

from stripe-php.

tiagocaus avatar tiagocaus commented on August 25, 2024

@remi-stripe

When a charge is created, there is no such thing as pi_***. Only one appears: Stripe\Checkout\Session JSON: {"id": "cs_test_a19YeWg0JtjVE8z.... but this ID is not the same when the payment is completed.

$checkout_session = $stripe->checkout->sessions->create([
    'customer_email' => '[email protected]',
    'metadata'       => [
        'pedido_id' => "ABC123",
    ],
    'line_items'     => [
        [
            'price_data' => [
                'currency'     => 'brl',
                'product_data' => [
                    'name' => 'T-shirt',
                ],
                'unit_amount'  => 2007,
            ],
            'quantity'   => 1,
        ]
    ],
    'mode'           => 'payment',
    'success_url'    => SISTEMA['painel'] . '/app/Modules/pagamentos/stripe/sucesso.php',
    'cancel_url'     => SISTEMA['painel'] . '/app/Modules/pagamentos/stripe/cancelado.php',
]);


$rs = $mysqli->prepare("INSERT INTO financeiro_logs (IDx, retorno_webhook) VALUES (?,?) ");
$rs->bind_param('ss', $IDx, $checkout_session);
$rs->execute();


header("HTTP/1.1 303 See Other");
header("Location: " . $checkout_session->url);

from stripe-php.

remi-stripe avatar remi-stripe commented on August 25, 2024

@tiagocaus Sorry you had never mentioned using Checkout in your original question. The docs https://docs.stripe.com/payments/checkout/fulfill-orders cover this in a lot of details and tell you how to handle fulfillment exactly.
Please work with our support team for 1:1 help instead of here: https://support.stripe.com/contact

from stripe-php.

tiagocaus avatar tiagocaus commented on August 25, 2024

@remi-stripe I've already tried talking to support. They can't help. This would be easily resolved if stripe adopted the standard of creating a unique ID, from the beginning to the end of the process! Why don't they do that?

from stripe-php.

remi-stripe avatar remi-stripe commented on August 25, 2024

@tiagocaus I'm sorry but this is exactly what the doc I linked you to explains in a lot of details. Please work with our support team for 1:1 help as you are asking for integration support.

from stripe-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.