coinbase / coinbase-commerce-woocommerce

Accept Bitcoin on your WooCommerce-powered website.
https://commerce.coinbase.com/integrate/woocommerce
Apache License 2.0
57 stars 40 forks source link

Stuck in Processing in WooCommerce, but CoinBase and Logs shows COMPLETED #37

Open bludsky123 opened 3 years ago

bludsky123 commented 3 years ago

Logs as shown below, extracted from uploads/wc-logs/coinbase-xxxx.log. I checked CoinBase, status is COMPLETED, but WooCommerec Orders do not get updated automatically. This is my first transaction with CoinBase, I didn't add any [Checkouts], don't think that is needed right?

Temporary Solution: I had to manually check CoinBase, then change the status to 'Completed' for my customers.

2021-06-24T17:54:30+00:00 INFO Webhook received event: Array
(
    [attempt_number] => 1
    [event] => Array
        (
            [api_version] => 2018-03-22
            [created_at] => 2021-06-24T17:54:29Z
            [data] => Array
                (
                    [id] => 1e47f73a-88b0-48db-a656-acfa79072c45
                    [code] => D546AV9X
                    [name] => Website Name
                    [pricing] => Array
                        (
                            [usdc] => Array
                                (
                                    [amount] => 15.000000
                                    [currency] => USDC
                                )

                            [local] => Array
                                (
                                    [amount] => 15.00
                                    [currency] => USD
                                )

                            [bitcoin] => Array
                                (
                                    [amount] => 0.00043072
                                    [currency] => BTC
                                )

                            [ethereum] => Array
                                (
                                    [amount] => 0.007426000
                                    [currency] => ETH
                                )

                            [litecoin] => Array
                                (
                                    [amount] => 0.11006751
                                    [currency] => LTC
                                )

                        )

                    [logo_url] => https://res.cloudinary.com/commerce/image/upload/v1624548069/image.jpg
                    [metadata] => Array
                        (
                            [source] => woocommerce
                            [order_id] => 400
                            [order_key] => wc_order_f2t3lBd711t1a
                        )

                    [payments] => Array
                        (
                            [0] => Array
                                (
                                    [block] => Array
                                        (
                                            [hash] => 223944369a74fbd4388c0b48fef0030d76c4b9420e395ed2022c692101753b7a
                                            [height] => 2075275
                                            [confirmations] => 1
                                            [confirmations_required] => 2
                                        )

                                    [value] => Array
                                        (
                                            [local] => Array
                                                (
                                                    [amount] => 15.00
                                                    [currency] => USD
                                                )

                                            [crypto] => Array
                                                (
                                                    [amount] => 0.11006751
                                                    [currency] => LTC
                                                )

                                        )

                                    [status] => CONFIRMED
                                    [network] => litecoin
                                    [detected_at] => 2021-06-24T17:49:14Z
                                    [transaction_id] => e4d30b09d54d2a8af46e2e03b3c0d97c7f08ac08bae3358d10ae7ff12098b8ee
                                )

                        )

                    [resource] => charge
                    [timeline] => Array
                        (
                            [0] => Array
                                (
                                    [time] => 2021-06-24T17:43:43Z
                                    [status] => NEW
                                )

                            [1] => Array
                                (
                                    [time] => 2021-06-24T17:49:15Z
                                    [status] => PENDING
                                    [payment] => Array
                                        (
                                            [value] => Array
                                                (
                                                    [amount] => 0.11006751
                                                    [currency] => LTC
                                                )

                                            [network] => litecoin
                                            [transaction_id] => e4d30b09d54d2a8af46e2e03b3c0d97c7f08ac08bae3358d10ae7ff12098b8ee
                                        )

                                )

                            [2] => Array
                                (
                                    [time] => 2021-06-24T17:54:29Z
                                    [status] => COMPLETED
                                    [payment] => Array
                                        (
                                            [value] => Array
                                                (
                                                    [amount] => 0.11006751
                                                    [currency] => LTC
                                                )

                                            [network] => litecoin
                                            [transaction_id] => e4d30b09d54d2a8af46e2e03b3c0d97c7f08ac08bae3358d10ae7ff12098b8ee
                                        )

                                )

                        )

                    [addresses] => Array
                        (
                            [usdc] => 0x2e66f71158d2cbeb48a15dfa3279947161aef15a
                            [bitcoin] => 3GomyAfHb5HgAyXegqhvG3kc5LpsaVFg5S
                            [ethereum] => 0x2e66f71158d2cbeb48a15dfa3279947161aef15a
                            [litecoin] => MFxPBPZFyoXJFPfxcsCuthBPCdRmN4x54L
                        )

                    [cancel_url] => https://www.mywebsite.com/cart/?cancel_order=true&order=wc_order_f2t3lBd711t1a&order_id=400&redirect&_wpnonce=469a9d0b24
                    [created_at] => 2021-06-24T17:43:43Z
                    [expires_at] => 2021-06-24T18:43:43Z
                    [hosted_url] => https://commerce.coinbase.com/charges/D546AV9X
                    [description] => 1 x Testing
                    [confirmed_at] => 2021-06-24T17:54:29Z
                    [pricing_type] => fixed_price
                    [redirect_url] => https://www.mywebsite.com/checkout/order-received/400/?key=wc_order_f2t3lBd711t1a
                    [support_email] => myemail@gmail.com
                    [brand_logo_url] => https://res.cloudinary.com/commerce/image/upload/v1624548069/image.jpg
                    [exchange_rates] => Array
                        (
                            [BTC-USD] => 34825.1
                            [ETH-USD] => 2019.795
                            [LTC-USD] => 136.28
                            [USDC-USD] => 1.0
                        )

                    [payment_threshold] => Array
                        (
                            [overpayment_absolute_threshold] => Array
                                (
                                    [amount] => 5.00
                                    [currency] => USD
                                )

                            [overpayment_relative_threshold] => 0.005
                            [underpayment_absolute_threshold] => Array
                                (
                                    [amount] => 5.00
                                    [currency] => USD
                                )

                            [underpayment_relative_threshold] => 0.005
                        )

                    [third_party_provider] => woocommerce
                )

            [id] => 50d9f7fe-ef92-48bc-a495-26dd99e14f07
            [resource] => event
            [type] => charge:confirmed
        )

    [id] => ad1fbd8d-2914-4052-bb6b-c5176ee75c79
    [scheduled_for] => 2021-06-24T17:54:29Z
)
AEiosApp commented 2 years ago

Same issue, also noticed in the order notes this one:

Screen Shot 2022-09-11 at 7 26 03 AM

Guys from Coinbase, looks like in this event status should be changed from Processing to Completed, but you are doing vice versa by mistake