• Hi,

    I need to use Stripe webhooks, to do some actions if the payment is successful. Is it possible with this plugin ?

    I was using the thank_you_page_url but it seems someone has been redirected to it after a payment error ??

    Thank you very much !

Viewing 3 replies - 1 through 3 (of 3 total)
  • Sure, you can hook here …

    do_action( 'asp_stripe_payment_completed', $data, $data['charge'] );

    Thread Starter clem97

    (@clem97)

    Thank you for your answer ??
    But I don’t understand. Normally, the webhook must be created from Stripe. And a custom action is configured in the called page.
    But here, the do_action has to be configured in wordpress, so how to call it ?
    Thank you very much !

    I just thought you needed to trigger something on your site during payment complete stage.
    If you call this hook which is already inside the plugin and dump those vars, you’ll see what I mean.

    function getTransactionData( $data, $data['charge'] ) {
    echo '<pre>';
    var_dump($data);
    echo '</pre>';
    }
    add_action( 'asp_stripe_payment_completed', 'getTransactionData', 10, 2);

    Put it inside WordPress Code Snippets plugin if you don’t want to create your own plugin or modify your theme files.
    You can also check out the existing addons for this plugin. Maybe it helps with what you’re trying to achieve.

    • This reply was modified 3 years, 5 months ago by Ovidiu.
    • This reply was modified 3 years, 5 months ago by Ovidiu.
    • This reply was modified 3 years, 5 months ago by Ovidiu.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Stripe webhook after payment’ is closed to new replies.