• Resolved andreprata

    (@andreprata)


    Hi there,

    I’m having issues with the payment type Multibanco and would appreciate your help on this.

    Everything is set up correctly, keys and webhooks. When a user makes a purchase on the website the payment details are generated, the source becomes chargeable and after six hours it’s cancelled as it doesn’t receive any charge request. The customer receives a refund.

    From Stripe’s documentation:

    “Once the source is chargeable, from your source.chargeable webhook handler, you can make a charge request using the source ID as the value for the source parameter to complete the payment.”

    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    \Stripe\Stripe::setApiKey('sk_test_mbvlxxxxxxxxndEjyrqX');
    
    $charge = \Stripe\Charge::create([
      'amount' => 1099,
      'currency' => 'eur',
      'source' => 'src_18eYalxxxxxxxxxl9ZTjSU0',
    ]);

    It looks like this is not happening for some reason.

    Could you please advise?

    Thank you,

    Andre.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hi @andreprata,

    It sounds as though either Stripe or your site is not communicating with each other to charge the payment.

    Is it only the Multibanco payment method you’re experiencing this behaviour with and do other methods for Stripe like Credit Cards charge correctly when you test those on your site?

    I’d also recommend enabling the Stripe gateways Debug Logging setting when testing from this setting below.

    Image Link: https://cloudup.com/cJzrn8XiGYR

    Thread Starter andreprata

    (@andreprata)

    Hi @stuartduff,

    Thank you for your reply.

    It is only Multibanco that’s giving issues. Other payment types like CC w/ Stripe are working just fine on this website.

    The debug logging is enabled but I can’t find any error message on the logs. Here’s an example:

    2019-11-25T17:17:03+00:00 DEBUG 
    ====Stripe Version: 4.3.1====
    ====Start Log====
    Info: Begin creating Multibanco source
    ====End Log====
    
    2019-11-25T17:17:03+00:00 DEBUG 
    ====Stripe Version: 4.3.1====
    ====Start Log====
    sources request: Array
    (
        [amount] => 250
        [currency] => eur
        [type] => multibanco
        [owner] => stdClass Object
            (
                [phone] => 123
                [name] => teste mb
                [email] => [email protected]
                [address] => Array
                    (
                        [line1] => rua
                        [line2] => 
                        [state] => 
                        [city] => cidade
                        [postal_code] => 1234-123
                        [country] => PT
                    )
    
            )
    
        [redirect] => Array
            (
                [return_url] => https://websitename.pt/finalizar-compra/order-received/8933/?key=wc_order_2qhxxxxxxnK0&utm_nooverride=1&order_id=8933
            )
    
        [statement_descriptor] => Website Name
    )
    
    ====End Log====
    
    2019-11-25T17:17:04+00:00 DEBUG 
    ====Stripe Version: 4.3.1====
    ====Start Log====
    Sending multibanco email for order #8933
    ====End Log====
    
    2019-11-25T17:17:05+00:00 DEBUG 
    ====Stripe Version: 4.3.1====
    ====Start Log====
    Info: Redirecting to Multibanco...
    ====End Log====

    I’m not really sure what to do at this point.

    Thanks for your help.

    Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hey @andreprata,

    Thanks for the information that it only seems to be the MultiBanco method along with the debug log contents.

    On the order do you see happen to see any helpful information on the Order Notes section on the right-hand side when viewing the Edit Order screen?

    Image Link: https://cloudup.com/cyL_A8riJaU

    Also, out of interest what do you have the Capture setting in Stripe’s setting set to in WooCommerce? Is it enabled to Capture?

    Image Link: https://cloudup.com/cqJB90AfDQ3

    Thread Starter andreprata

    (@andreprata)

    Hi @stuartduff,

    Thanks for getting back to me.

    On the order notes I don’t have any useful information. It only has one entry and can read:

    Awaiting Multibanco payment Order status changed from Pending Payment to Awaiting for Payment Confirmation.

    The capture setting in Stripe settings is set to “Capture charge immediately”.

    Thank you for your support.

    Andre.

    Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hey @andreprata,

    Thanks for confirming those settings for me and it seems like you have everything set up as it should be.

    The order note seems to indicate that WooCommerce is awaiting confirmation from Multibanco that payment has been made and if that was never to arrive WooCommerce would then cancel the order.

    It would be Stripe who would confirm that payment was received and that should then trigger the charge.succeeded webhook.

    https://stripe.com/docs/sources/multibanco

    If Stripe was not firing the correct webhook WooCommerce would not confirm to WooCommerce that payment had been received.

    When you added your webhook in Stripe did you select the receive all events option like this below?

    Image Link: https://cloudup.com/ctaVL951LDP

    When you visit your https://dashboard.stripe.com/webhooks/ section and look at your added webhook do you also see any Webhook attempts which have succeeded or failed like this example?

    Image Link: https://cloudup.com/cn1JStnMlom

    Thread Starter andreprata

    (@andreprata)

    Hi @stuartduff,

    Thank you for your reply.

    When the webhook was added to Stripe only 5 events were selected:

    
    charge.captured
    charge.expired
    charge.failed
    charge.refunded
    charge.succeeded
    

    Regarding the webhooks failing, I just found this errors.

    After taking a deeper look I noticed none of those fails is from Multibanco, all credit cards, and they are multiple attempts for just 3 orders (which I can’t find them on WooCommerce backend, btw).

    Thanks again for your time Stuart, much appreciated.

    Have a great day, cheers!

    Andre.

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    Hey there Andre,

    I’m glad to hear you’ve made progress! Can you confirm that you’re all set with the Multibanco payments now?

    Thread Starter andreprata

    (@andreprata)

    Hi @fernashes,

    Not sure what progress you’re referring to as my issue still persists, just like it was when I first opened this topic.

    I believe the option now is just to try a plugin alternative that works with MB and this website. It looks like the combination of Stripe / Multibanco / ThisWebsite doesn’t work at all. It’s a shame I couldn’t find the reason behind this but I just can’t keep banging my head to the wall if there are other nice alternatives out there.

    The issue is not resolved but if the support can’t support any further please feel free to close this topic. Just don’t mark it as resolved, if that’s an option.

    And thanks again @stuartduff for your dedication to this. Much appreciated.

    Have a great day.

    Andre.

    Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hey @andreprata,

    Looking at the WebHooks errors I’m not seeing any from MultiBanco either which means one of two things, either there are no errors or MultiBanco is not contacting the site to initiate any!

    What I’d suggest as a final test is to delete the existing webhooks and try adding them by using the receive all events to see if that makes any difference for you.

    Thread Starter andreprata

    (@andreprata)

    Hey @stuartduff,

    Thanks for getting back to me.

    It looks like I gave you the wrong info a couple of replies back, regarding the webhook and webhook errors. The info I gave you was from another Stripe account (with the same name, now fixed).

    So, the events that are selected for the webhook are:

    source.canceled
    source.chargeable
    charge.captured
    charge.expired
    charge.failed
    charge.pending
    charge.refunded
    charge.succeeded
    charge.updated
    charge.dispute.closed
    charge.dispute.created
    charge.dispute.funds_reinstated
    charge.dispute.funds_withdrawn
    charge.dispute.updated
    charge.refund.updated

    And there are no failed webhook attempts. Here’s a screenshot with the events source.chargeable and source.cancelled for a Multibanco payment.

    Link to image file: http://tinyurl.com/sa4e8ly

    Anyway, I’ll do as you suggested, disable the current webhook and add it again with the receive all events option. I will also use an updated API version as the current one is from 2018-11-08.

    Thanks again for your precious help.

    Have a great day.

    Andre.

    Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hey @andreprata,

    Those hooks do look okay right? This is a weird one and please let us know how you get on after trying the receive all webhooks method and a newer API as a comparison test.

    Thanks

    Hi @andreprata

    Just checking-in on this for you. Were you able to try out the receive all webhooks method and a newer API, as we had suggested earlier?

    Since we haven’t heard from you in a while, I’m going to mark this topic as Resolved. Let us know if you keep running into troubles. You can either reply here to follow-up with the same problem, or create a new thread to report your troubles to us.

    All the best!

    Thread Starter andreprata

    (@andreprata)

    hey @stuartduff and @harishanker,

    sorry for my silence for the last couple of weeks. I did try with the receive all webhooks method with the most recent API version and with no success. The same thing happens. The source becomes chargeable and after six hours it’s cancelled as it doesn’t receive any charge request.

    I need to try another option now as I’m out of tests to perform to try to find the cause of this issue. Will try the IfThenPay plugin which works with the Multibanco System.

    Thank you for your help and support on this, much appreciated.

    Have a great year 😉

    Andre.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Multibanco payment type doesn’t charge the source’ is closed to new replies.