Giter Club home page Giter Club logo

coinbase-commerce-woocommerce's Introduction

Coinbase Commerce for WooCommerce

Note: This repository is not actively maintained.

A WooCommerce payment gateway that allows your customers to pay with cryptocurrency via Coinbase Commerce

Installation

From WordPress.org

This plugin is available on the WordPress.org plugin repository, and can be installed either directly from there or from the admin dashboard within your website.

Within your WordPress dashboard

  1. Visit ‘Plugins > Add New’
  2. Search for ‘Coinbase Commerce’
  3. Activate Coinbase Commerce from your Plugins page.

From WordPress.org plugin repository

  1. Download Coinbase Commerce from https://wordpress.org/plugins/coinbase-commerce/
  2. Upload to your ‘/wp-content/plugins/’ directory, using your favorite method (ftp, sftp, scp, etc…)
  3. Activate Coinbase Commerce from your Plugins page.

From this repository

Within the Github repository, click the Clone or Download button and Download a zip file of the repository, or clone it directly via command line.

Within your WordPress administration panel, go to Plugins > Add New and click the Upload Plugin button on the top of the page.

Alternatively, you can move the zip file into the wp-content/plugins folder of your website and unzip.

You will then need to go to your WordPress administration Plugins page, and activate the plugin.

Configuring Coinbase Commerce

You will need to set up an account on Coinbase Commerce.

Within the WordPress administration area, go to the WooCommerce > Settings > Payments page and you will see Coinbase in the table of payment gateways.

Clicking the Manage button on the right hand side will take you into the settings page, where you can configure the plugin for your store.

Note: If you are running version of WooCommerce older than 3.4.x your Coinbase Commerce tab will be underneath the WooCommerce > Settings > Checkout tab

Settings

Enable / Disable

Turn the Coinbase Commerce payment method on / off for visitors at checkout.

Title

Title of the payment method on the checkout page

Description

Description of the payment method on the checkout page

API Key

Your Coinbase Commerce API key. Available within the Coinbase Commerce settings page.

Using an API key allows your website to periodically check Coinbase Commerce for payment confirmation.

Webhook Shared Secret

Your webhook shared secret. Available within the Coinbase Commerce settings page.

Using webhooks allows Coinbase Commerce to send payment confirmation messages to the website. To fill this out:

  1. In your Coinbase Commerce settings page, scroll to the 'Webhook subscriptions' section
  2. Click 'Add an endpoint' and paste the URL from within your settings page.
  3. Make sure to select "Send me all events", to receive all payment updates.
  4. Click "Show shared secret" and paste into the box within your settings page.

Debug log

Whether or not to store debug logs.

If this is checked, these are saved within your wp-content/uploads/wc-logs/ folder in a .log file prefixed with coinbase-

Prerequisites

To use this plugin with your WooCommerce store you will need:

Frequently Asked Questions

What cryptocurrencies does the plugin support?

The plugin supports all cryptocurrencies available at Coinbase Commerce

Does Coinbase Commerce have integrations with other commerce platforms?

Yes, the list of all integrations can be found here: Coinbase Commerce Integrations.

License

This project is licensed under the Apache 2.0 License

Changelog

1.4.1

  • Tested against WordPress 6.5.3
  • Tested against WooCommerce 8.9.1

1.4

  • Declare HPOS Compatibility
  • Remove deprecated Charge status mappings
  • Fix order_id incorrect format error
  • Update coinbase_charge_id to be charge.id

1.3

  • Adds HPOS support

1.2

  • Tested against WordPress 6.0
  • Tested against WooCommerce 6.5.1

1.1.4

  • Bug fix: Sending order confirmation emails in WooCommerce.

1.1.0

  • Added support for charge cancel url.
  • Handle cancelled events from API.
  • Add option to disable icons on checkout page.
  • Add Coinbase Commerce transaction ID to WooCommerce order output (Admin order page, Customer order page, email confirmation).
  • Updated README.md

1.0.2

  • Tested against WordPress 4.9.4

1.0.1

  • Tested against WordPress 4.9.7
  • Tested against WooCommerce 3.4.3
  • Updated README.md
  • Updated plugin meta in coinbase-commerce.php

1.0.0

  • Coinbase Commerce

coinbase-commerce-woocommerce's People

Contributors

bobg avatar bporcelli avatar chrisloeper-coinbase avatar ciscospirit avatar dreamsorcerer avatar eddpragmatic avatar guacamoli avatar guyton-cb avatar imeleshko avatar justinpobrien avatar ksmithbaylor avatar maksim-s avatar pascalroget avatar robbybarton-cb avatar sahil-cb avatar samiragadri-34 avatar sds avatar yasaswiniaddada-cb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coinbase-commerce-woocommerce's Issues

Blockchain Pending Status

After successful payment via Coinbase few days ago, my Woocommerce store is still showing "Blockchain Pending" status.

Does it get auto updated or do i need to do something and what is the turnaround time for status update?

Thanks.

Order Received page issue

The order received page shows Coinbase data even when payment through stripe . see here in this test order i made
image

Fatal Error

2023-11-18T12:24:34+00:00 CRITICAL Uncaught Error: Call to a member function get_meta() on bool in public_html/wp-content/plugins/coinbase-commerce/class-wc-gateway-coinbase.php:382
Stack trace:
#0 /public_html/wp-content/plugins/coinbase-commerce/class-wc-gateway-coinbase.php(332): WC_Gateway_Coinbase->_update_order_status(false, Array)
#1 /public_html/wp-includes/class-wp-hook.php(324): WC_Gateway_Coinbase->handle_webhook('')
#2 /public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
#3 /public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#4 /public_html/wp-content/plugins/woocommerce/includes/class-wc-api.php(161): do_action('woocommerce_api...')
#5 /public_html/wp-includes/class-wp-hook.php(324): WC_API->handle_api_requests(Object(WP))
#6 /public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#7 /public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
#8 /public_html/wp-includes/class-wp.php(418): do_action_ref_array('parse_request', Array)
#9 /public_html/wp-includes/class-wp.php(813): WP->parse_request('')
#10 /public_html/wp-includes/functions.php(1336): WP->main('')
#11 /public_html/wp-blog-header.php(16): wp()
#12 /public_html/index.php(17): require('/home/egycar5/p...')
#13 {main}

this report from Woocommerce log.

No "New Order #XXX" sent to site admin

This may be tied to issue #7, but I haven't received a notification from my website that I've received a new order. I've confirmed that I'm receiving this email with other payment methods.

Thanks,

Should unpaid for orders automatically cancel?

Hi there,

Should orders that are in 'Pending Payment' for longer than X (??) minutes automatically be marked as Failed? Or do they stay in Pending Payment until manually cancelled?

Thanks,

User seeing an error

The version 1.1.1 that you have put, I was already using it downloaded from
https://github.com/coinbase/coinbase-commerce-woocommerce

is a project of many months ago, and always finds many problems with the
latest version of wordpress.
always error:

2019-04-27T00:00:25+00:00 CRITICAL Uncaught Error: Call to a member
function get_meta() on boolean in
/home/wp_pc9bcp/iclunlock.com/wp-content/plugins/coinbase-commerce/class-wc-gateway-coinbase.php:346
Stack trace:
#0 /home/wp_pc9bcp/iclunlock.com/wp-content/plugins/coinbase-commerce/class-wc-gateway-coinbase.php(299):
WC_Gateway_Coinbase->_update_order_status(false, Array)
#1 /home/wp_pc9bcp/iclunlock.com/wp-includes/class-wp-hook.php(286):
WC_Gateway_Coinbase->handle_webhook('')
#2 /home/wp_pc9bcp/iclunlock.com/wp-includes/class-wp-hook.php(310):
WP_Hook->apply_filters('', Array)
#3 /home/wp_pc9bcp/iclunlock.com/wp-includes/plugin.php(465):
WP_Hook->do_action(Array)
#4 /home/wp_pc9bcp/iclunlock.com/wp-content/plugins/woocommerce/includes/class-wc-api.php(113):
do_action('woocommerce_api...')
#5 /home/wp_pc9bcp/iclunlock.com/wp-includes/class-wp-hook.php(286):
WC_API->handle_api_requests(Object(WP))
#6 /home/wp_pc9bcp/iclunlock.com/wp-includes/class-wp-hook.php(310):
WP_Hook->apply_filters(NULL, Array)
#7 /home/wp_pc9bcp/iclunlock.com/wp-inc in
/home/wp_pc9bcp/iclunlock.com/wp-content/plugins/coinbase-commerce/class-wc-gateway-coinbase.php
on line 346

handle_webhook Should check chargeid(code)

If two woocommerce website use same account. coinbase server will post same result to all webs' webhook.
if two web's woocommerce order is euqal,handle_webhook will not check this order whether or not belong to this system.

Another way is add a new meta like: host url,app name ...etc.

PHP7 check out error

For every visitor there is a galaxy of errors...

[Sun Nov 14 15:48:41.186353 2021] [php7:warn] [pid 12507] [client 151.19.36.63:20033] PHP Warning: rmdir(/var/www/html/wp-content/cache/wpo-cache/www.visura.uno): Directory not empty in /var/www/html/wp-content/plugins/wp-optimize/cache/file-based-page-cache-functions.php on line 879, referer: https://www.visura.uno/wp-admin/admin.php?page=wpo_cache
[Sun Nov 14 15:48:41.186651 2021] [php7:warn] [pid 12507] [client 151.19.36.63:20033] PHP Warning: rmdir(/var/www/html/wp-content/cache/wpo-cache): Directory not empty in /var/www/html/wp-content/plugins/wp-optimize/cache/file-based-page-cache-functions.php on line 879, referer: https://www.visura.uno/wp-admin/admin.php?page=wpo_cache
[Sun Nov 14 16:39:55.513776 2021] [php7:error] [pid 13040] [client 54.175.255.218:34679] PHP Fatal error: Uncaught Error: Call to a member function get_meta() on bool in /var/www/html/wp-content/plugins/coinbase-commerce/class-wc-gateway-coinbase.php:346\nStack trace:\n#0 /var/www/html/wp-content/plugins/coinbase-commerce/class-wc-gateway-coinbase.php(299): WC_Gateway_Coinbase->_update_order_status()\n#1 /var/www/html/wp-includes/class-wp-hook.php(303): WC_Gateway_Coinbase->handle_webhook()\n#2 /var/www/html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()\n#3 /var/www/html/wp-inc

Order is not being completed

Inside commerce.coinbase account, I can confirm that the crypto transaction was completed.
But it is updating on wordpress woocommerce.

I connected 3 websites to one coinbase account.
Can you let me know how to fix?

Thank you!

image

PHP Fatal error

PHP Fatal error: Uncaught Error: Call to a member function get_meta() on bool in wp-content/plugins/coinbase-commerce/class-wc-gateway-coinbase.php:346
Stack trace:
#0 wp-content/plugins/coinbase-commerce/class-wc-gateway-coinbase.php(299): WC_Gateway_Coinbase->_update_order_status(false, Array)
#1 wp-includes/class-wp-hook.php(292): WC_Gateway_Coinbase->handle_webhook('')
#2 wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
#3 wp-includes/plugin.php(484): WP_Hook->do_action(Array)
#4 wp-content/plugins/woocommerce/includes/class-wc-api.php(161): do_action('woocommerce_api...')
#5 wp-includes/class-wp-hook.php(292): WC_API->handle_api_requests(Object(WP))
#6 wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array)
#7 wp-includes/plugin.php(551): WP_Hook in wp-content/plugins/coinbase-commerce/class-wc-gateway-coinbase.php on line 346

Required parameter missing: pricing_type

Request

POST https://api.commerce.coinbase.com/charges HTTP/1.1
Host: api.commerce.coinbase.com
User-Agent: coinbase-http-client
Content-Length: 128
Content-Type: applicaton/json
X-Cc-Api-Key: 2226376d-53a4-484a-a838-99f960a6a432
X-Cc-Version: 2018-03-22
Accept-Encoding: gzip

{"name":"Test Charge","description":"Test Charge","pricing_type":"fixed_price","local_price":{"amount":"5.00","currency":"USD"}}

Response

HTTP/1.1 400 Bad Request
Date: Fri, 23 Apr 2021 12:38:10 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 89
Connection: keep-alive
Set-Cookie: __cfduid=d5f077d3f3511407e9e76f02c6bb67b8d1619181490; expires=Sun, 23-May-21 12:38:10 GMT; path=/; domain=.commerce.coinbase.com; HttpOnly; SameSite=Lax
Cache-Control: no-cache
Vary: Cookie, Origin
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Request-Id: 0e9650a7-28a1-414c-8bcb-cca572bd228b
CF-Cache-Status: DYNAMIC
cf-request-id: 09a055e9a20000615f568dd000000001
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 644725bc3b3c615f-ORD

{"error":{"type":"invalid_request","message":"Required parameter missing: pricing_type"}}

Single Page Checkout Not Working

Using Coinbase Commerce v1.1.4 and WooCommerce 5.3.0, I am having an issue where the loading (jQuery/WooCommerce Block Overlay) is not going away for the shop table and payment section. This issue only happens (screenshot below) when using the WooCommerce single page checkout. Shown in this screenshot:

Screen Shot 2021-05-29 at 4 35 10 PM

Specifically, the two components are the shop_table woocommerce-checkout-review-order-table and woocommerce-checkout-payment sections.

It sounds like this is similar to what was posted in https://wordpress.org/support/topic/doesnt-work-with-woocommere-blocks-checkout/

Proceed to Pay Button Missing

Proceed to Pay Button Missing

No idea what is causing this. Could it be my version of wordpress is newer, that is causing the problem?

Anyone has a solution? You can take a look at EatWorklive.Love and try it out. Appreciate if anyone has a solution to this.

Sql Injection

This plugin has SQL injection and malicious code it doesn't work on wordpress.

Stuck In "Pending Payment" Status Even After Payment Has Cleared

Recently, the WooCommerce statuses stopped updating from Pending Payment to Processing after the payment has cleared and we are having to go in and manually check the payments and change their status to Processing.
On our install, once the order gets to the "Processing" status, it automatically sends shipping info to ShipStation and then ShipStation changes the status to "Complete" once the order has shipped.
It's always been like this, but recently just stopped working.
Here is a recent log from the debug logs:

2021-04-14T10:52:00+00:00 INFO Coinbase Request Args for charges: Array
(
    [name] => My Store
    [description] => 1 x My Product
    [pricing_type] => fixed_price
    [local_price] => Array
        (
            [amount] => 52.99
            [currency] => USD
        )

    [metadata] => Array
        (
            [order_id] => 246883
            [order_key] => wc_order_8X5ZWKk9odPiZ
            [source] => woocommerce
        )

    [redirect_url] => https://mywebsite.com/checkout/order-received/246883/?key=wc_order_4z5ZqKk9idPiZ&utm_nooverride=1
    [cancel_url] => https://mywebsite.com/cart/?cancel_order=true&order=wc_order_4z5ZqKk9idPiZ&order_id=246883&redirect&_wpnonce=631c4c0c4c
)

Multiple api keys and webhook secrets?

I am interested in accepting Coinbase Commerce in our website. I run a multi-vendor website based on woo-commerce. It is not a multi-site.

I would like to offer our vendors the ability to accept coinbase payments without being a middleman in the transaction.

At first glance It would seem that we would need to:

  1. Ask each vendor for their API key and webhook secret to be able to allow them to accept coinbase commerce transactions.
  2. Override both the API key and webhook secret for each transaction, with the vendors' key & secret

Questions:

Would this make sense from a technical standpoint?

If we did ask each vendor to supply an API key, could we simply use one central webhook secret or would that fail?

Can one server receive notifications for multiple accounts in this manner?

What are the security risks of storing API key and webhook secret for each vendor?

Is it already possible to override the API key and webhook secret with your plugin? If not, would you be willing to provide actions that we can hook into?

Thanks in advance for your help and clarification!!

Add missing icons for supported coins

The following supported coins don't have icons that can appear on the checkout page:

ApeCoin
Dai
Dogecoin
SHIBA INU
Tether

Can we please get these added?

PHP Notice: payment_method was called **incorrectly**. Order properties should not be accessed directly.

I found out that there is a PHP notice problem:

To fix this I checked into the coinbase-commerce.php and found there 2 references to "payment_method".

/**
 * Add order Coinbase meta after General and before Billing
 *
 * @see: https://rudrastyh.com/woocommerce/customize-order-details.html
 *
 * @param WC_Order $order WC order instance
 */
function cb_order_meta_general( $order )
{
    if ($order->payment_method == 'coinbase') {
        ?>

        <br class="clear"/>
        <h3>Coinbase Commerce Data</h3>
        <div class="">
            <p>Coinbase Commerce Reference # <?php echo esc_html($order->get_meta('_coinbase_charge_id')); ?></p>
        </div>

        <?php
    }
}
/**
 * Add Coinbase meta to WC emails
 *
 * @see https://docs.woocommerce.com/document/add-a-custom-field-in-an-order-to-the-emails/
 *
 * @param array    $fields indexed list of existing additional fields.
 * @param bool     $sent_to_admin If should sent to admin.
 * @param WC_Order $order WC order instance
 *
 */
function cb_custom_woocommerce_email_order_meta_fields( $fields, $sent_to_admin, $order ) {
    if ($order->payment_method == 'coinbase') {
        $fields['coinbase_commerce_reference'] = array(
            'label' => __( 'Coinbase Commerce Reference #' ),
            'value' => $order->get_meta( '_coinbase_charge_id' ),
        );
    }
    return $fields;
}

there i changed:

this:
if ($order->payment_method == 'coinbase') {
to:
if ($order->get_payment_method() == 'coinbase') {

and

this:

function cb_custom_woocommerce_email_order_meta_fields( $fields, $sent_to_admin, $order ) {
    if ($order->payment_method == 'coinbase') {

to:

function cb_custom_woocommerce_email_order_meta_fields( $fields, $sent_to_admin, $order ) {
    if ($order->get_payment_method() == 'coinbase') {

This will fix the PHP notice problem.

PHP Fatal error - invalid order number.

I'm seeing some errors when the webhook is called, seemingly the order_id is invalid.

In handle_webhook()

$order_id = $event_data['metadata']['order_id'];
$this->_update_order_status( wc_get_order( $order_id ), $event_data['timeline'] );

wc_get_order( $order_id ) is returning false.

The full log:

PHP Fatal error:  Uncaught Error: Call to a member function get_meta() on boolean in /home/user/public_html/wp-content/plugins/coinbase-commerce/class-wc-gateway-coinbase.php:346
Stack trace:
#0 /home/user/public_html/wp-content/plugins/coinbase-commerce/class-wc-gateway-coinbase.php(299): WC_Gateway_Coinbase->_update_order_status(false, Array)
#1 /home/user/public_html/wp-includes/class-wp-hook.php(288): WC_Gateway_Coinbase->handle_webhook('')
#2 /home/user/public_html/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters('', Array)
#3 /home/user/public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#4 /home/user/public_html/wp-content/plugins/woocommerce/includes/class-wc-api.php(148): do_action('woocommerce_api...')
#5 /home/user/public_html/wp-includes/class-wp-hook.php(288): WC_API->handle_api_requests(Object(WP))
#6 /home/user/public_html/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(NULL, Array)
#7 /home/user/public_html/wp-includes/plugin.php(544): WP_H in /home/user/public_html/wp-content/plugins/coinbase-commerce/class-wc-gateway-coinbase.php on line 346

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

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?

  • WordPress Version: 5.7.2
  • WooCoomerce Version: 5.4.1
  • CoinBase Version: 1.1.4

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&amp;order=wc_order_f2t3lBd711t1a&amp;order_id=400&amp;redirect&amp;_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] => [email protected]
                    [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
)

Order Cancelled after payment has been taken

Orders seem to cancel after the payment has been taken and then I have to go into woocommerce and manually complete the order. Due to the nature of the business and the system issuing a ticket number upon payment the system needs to auto turn the order to complete.

Any ideas?

Thanks

Plugin will expire orders that are processing

How to reproduce:

-> Attempt to pay via Coinbase
-> Go back and pay via another payment method
-> Order transitions to "Processing"
-> After the given delay, plugin will expire the order and set it to "Cancelled"
-> Customer will not receive goods/services that were paid for

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.