• Resolved msolution

    (@msolution)


    Hey,
    I have enabled and setup stripe for WooCommerce, and enabled webhooks and tested it with Stripe dashboard, all works good, except when i actually test it (with test dataand test keys).

    Objective: Get $charge data to get the billing_details/ source->owner address details, as an additional measure at our end as a measure of fraud prevention. So the billing address details provided by the customer should be same as the credit card (address) details.

    If i enable “Capture charge immediately”, the hook “wc_gateway_stripe_process_payment”, does not get called coz the order status is “processing” and it bails before it reaches the action hook.

    If I disable “Capture charge immediately”, at the time of sale it bails coz the order status is “on-hold”, and when i click capture from Stripe dashboard, it bails coz before it reaches the hook coz order status is processing.

    am i missing something here?

    what is the best way to get these (card owner address) details?

    Warm Regards,

Viewing 7 replies - 1 through 7 (of 7 total)
  • laceyrod

    (@laceyrod)

    Automattic Happiness Engineer

    Hi @msolution

    Thanks for reaching out.

    I have enabled and setup stripe for WooCommerce, and enabled webhooks and tested it with Stripe dashboard, all works good, except when i actually test it (with test dataand test keys).

    To make sure I’m on the same page, you’re testing this in Stripe’s test mode using the test card numbers, and the payment is failing, is that correct?

    Do you happen to have Stripe logging enabled? If so, can you let us know what the logs specifically are saying?

    Also, would you mind copying and pasting your System Status Report into this thread so that we can review it? You can find this by going to WooCommerce > Status > System Status > Get System Report in your WP-Admin dashboard.

    Thanks and looking forward to your reply!

    Thread Starter msolution

    (@msolution)

    anyone?

    this is card payments, if that helps

    Regards,

    Plugin Support wpnomad a11n

    (@wpnomad)

    Hi @msolution ,

    So as I understand, you’re fetching the address details for fraud prevention. I’m wondering if you have explored using Stripe’s Radar feature for this purpose?

    Also, I’m not sure what webhook setup you’re using, but if the webhook is set up within WooCommerce, then you can use the “Order Created” topic to fire the webhook.

    If you need further help, then I’d recommend collaborating with a web developer since your requirement is custom and isn’t something that’s offered directly by the Stripe plugin.

    Thread Starter msolution

    (@msolution)

    Hey @laceyrod,
    thanks for getting back to me, guess i posted on a stale page without refreshing, so i did not see you already responded, really sorry for that!

    No, the process of accepting payments via cards is working and everything is fine, I’m just trying to use the hook, “wc_gateway_stripe_process_payment” given inside the function WC_Stripe_Webhook_Handler::process_payment_intent_success()

    But when this function is invoked on a successful payment, and at the following line it bails from the function coz the order status is at “processing”,

    if ( ! $order->has_status( array( 'pending', 'failed' ) ) ) {

    Just wondering why, and if this is a bug?

    I cant seem to find any other hook to get the $notification variable to get card owner address details.

    Hey @wpnomad,
    thanks for responding, im not using WC web hooks, just the one stripe has. Copied the URL on the stripe web hook dashboard, and listening to the same.

    I am a web dev hired to make this ??

    Warm Regards,

    • This reply was modified 3 years, 8 months ago by msolution.
    Plugin Support Damianne P (a11n)

    (@drwpcom)

    Hi @msolution. For help with development, I recommend the following places, where you can communicate with other developers rather than with support staff (who focus on the built-in features of the plugin):

    You can also access developer resources at https://developer.woocommerce.com/.

    Thread Starter msolution

    (@msolution)

    Hey @drwpcom,
    thanks for the help! guess the new version 5.0.0 fixes alot of issues, including mine ??

    for anyone who has similar issues the hook ‘wc_gateway_stripe_process_response’ fixed it for me. to get charge information, use this hook.

    Regards & Thanks
    M.

    Plugin Support Saravanan S, a11n

    (@simplysaru)

    Hi @msolution

    Glad to know that your issues were fixed with the update to 5.0.0.

    Thanks for keeping everyone updated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Capturing charge with webhooks with “wc_gateway_stripe_process_payment”’ is closed to new replies.