Giter Site home page Giter Site logo

woocommerce / woocommerce-gateway-stripe Goto Github PK

View Code? Open in Web Editor NEW
228.0 133.0 195.0 25.77 MB

The official Stripe Payment Gateway for WooCommerce

Home Page: https://wordpress.org/plugins/woocommerce-gateway-stripe/

JavaScript 34.42% PHP 62.95% Shell 1.15% Dockerfile 0.04% SCSS 0.99% HTML 0.46%
transact

woocommerce-gateway-stripe's Introduction

=== WooCommerce Stripe Payment Gateway ===
Contributors: woocommerce, automattic, royho, akeda, mattyza, bor0, woothemes
Tags: credit card, stripe, apple pay, payment request, google pay, sepa, bancontact, alipay, giropay, ideal, p24, woocommerce, automattic
Requires at least: 6.2
Tested up to: 6.5.2
Requires PHP: 7.4
Stable tag: 8.4.0
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Attributions: thorsten-stripe

Take credit card payments on your store using Stripe.

== Description ==

Accept Visa, MasterCard, American Express, Discover, JCB, Diners Club, SEPA, iDEAL, giropay, Alipay, and more directly on your store with the Stripe payment gateway for WooCommerce, including Apple Pay, Google Pay, and Microsoft Pay for mobile and desktop.

= Take Credit card payments easily and directly on your store =

The Stripe plugin extends WooCommerce allowing you to take payments directly on your store via Stripe’s API.

Stripe is available for Store Owners and Merchants in:

* Australia
* Austria
* Belgium
* Brazil
* Bulgaria
* Canada
* Cyprus
* Czech Republic
* Denmark
* Estonia
* Finland
* France
* Germany
* Greece
* Hong Kong
* Ireland
* Italy
* Japan
* Latvia
* Lithuania
* Luxembourg
* Malaysia
* Malta
* Mexico
* Netherlands
* New Zealand
* Norway
* Poland
* Portugal
* Puerto Rico
* Singapore
* Slovakia
* Slovenia
* Spain
* Sweden
* Switzerland
* United Kingdom
* United States
* [with more being added](https://stripe.com/global)

Stripe is a simple way to accept payments online. With Stripe you can accept Visa, MasterCard, American Express, Discover, JCB, and Diners Club cards, even Bitcoin, directly on your store.

= Why choose Stripe? =

Stripe has no setup fees, no monthly fees, no hidden costs: you only get charged when you earn money! Earnings are transferred to your bank account on a 7-day rolling basis.

Stripe also supports the [WooCommerce Subscriptions extension](https://woocommerce.com/products/woocommerce-subscriptions/) and re-using cards. When a customer pays, they are set up in Stripe as a customer. If they create another order, they can check out using the same card. A massive timesaver for returning customers.

= Apple Pay Support =

WooCommerce Stripe includes [Apple Pay](https://woocommerce.com/apple-pay) support, which means customers can pay using payment details associated with their Apple ID. Checkout is now just an authorization (Touch ID or Face ID) away on both mobile and desktop. Only supports simple, variable, and Subscription products for now. More support to come.

= Web Payments API Support =

WooCommerce Stripe includes [Web Payments API](https://www.w3.org/TR/payment-request/) support, which means customers can pay using payment details associated to their mobile devices, in browsers supporting the Web Payments API (Chrome for Android, amongst others). Checkout is now just a few taps away on mobile. Only supports simple, variable, and Subscription products for now. More support to come.

== Installation ==

You can download an [older version of this gateway for older versions of WooCommerce from here](https://wordpress.org/plugins/woocommerce-gateway-stripe/developers/).

Please note, v4 of this gateway requires WooCommerce 3.0 and above.

= Automatic installation =

Automatic installation is the easiest option as WordPress handles the file transfers itself and you don’t need to leave your web browser. To do an automatic install of the WooCommerce Stripe plugin, log in to your WordPress dashboard, navigate to the Plugins menu and click Add New.

In the search field type “WooCommerce Stripe Payment Gateway” and click Search Plugins. Once you’ve found our plugin you can view details about it such as the point release, rating, and description. Most importantly, of course, you can install it by simply clicking "Install Now", then "Activate".

= Manual installation =

The manual installation method involves downloading our plugin and uploading it to your web server via your favorite FTP application. The WordPress codex contains [instructions on how to do this here](http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).

= Updating =

Automatic updates should work like a charm; as always though, ensure you backup your site just in case.

== Frequently Asked Questions ==

= Does this support recurring payments, like for subscriptions? =

Yes!

= Does this require an SSL certificate? =

Yes! In Live Mode, an SSL certificate must be installed on your site to use Stripe. In addition to SSL encryption, Stripe provides an extra JavaScript method to secure card data using [Stripe Elements](https://stripe.com/elements).

= Does this support both production mode and sandbox mode for testing? =

Yes, it does - production and Test (sandbox) mode is driven by the API keys you use with a checkbox in the admin settings to toggle between both.

= Where can I find documentation? =

For help setting up and configuring, please refer to our [documentation](https://woocommerce.com/document/stripe/).

= Where can I get support or talk to other users? =

If you get stuck, you can ask for help in the Plugin Forum.

== Screenshots ==

1. The Stripe payment gateway settings page used to configure the plugin.
2. Offer a range of payment options such as local methods and express checkouts.
3. Allow customers to save payment methods and add new ones for their future purchases.
4. Apple Pay and other express methods can be added to product pages, cart, and checkout.

== Changelog ==

= 8.5.0 - 2024-xx-xx =
* Fix - When using a saved payment method, update the payment method's address immediately upon checkout. Fixes issues where Stripe may throw address validation errors.
* Add - Allow customizing the title and description of the UPE payment methods.
* Tweak - Add a statement descriptor preview for Cash App Payments.

[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/trunk/changelog.txt).

woocommerce-gateway-stripe's People

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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

woocommerce-gateway-stripe's Issues

Notice when trying to activate the plugin when WooCommerce is not active

Notice: Use of undefined constant WC_VERSION - assumed 'WC_VERSION' in /srv/www/wc.demo/htdocs/wp-content/plugins/woocommerce-gateway-stripe/woocommerce-gateway-stripe.php on line 193

Notice: Use of undefined constant WC_VERSION - assumed 'WC_VERSION' in /srv/www/wc.demo/htdocs/wp-content/plugins/woocommerce-gateway-stripe/woocommerce-gateway-stripe.php on line 199
The plugin could not be activated. The minimum WooCommerce version required for this plugin is 2.5.0. You are running WC_VERSION.

Make sure to check whether WC_VERSION is defined or not.

When saved card is present, default payment method cannot be changed

What I expected

I expected to be able to change the default selected payment method using the Gateway Order Display - WooCommerce > Settings > Checkout > Gateway Order Display.

What happened instead

When a customer has a saved card, Stripe is always the default payment gateway regardless of the payment gateway order in the Gateway Order Display.

Steps to reproduce the issue

  1. Enabled Saved Cards in the Stripe extension settings - WooCommerce > Settings > Checkout > Stripe
  2. Place an order using Stripe as the payment method, selecting the option to save the card to your account
  3. Navigate to WooCommerce > Settings > Checkout > Gateway Order Display, drag another payment gateway to the top and save. You may need to do this twice but that's another issue
  4. Navigate to WooCommerce > System Status > Tools and Clear all sessions. I find that I always have to clear session data after changing payment gateway priority
  5. Attempt to purchase a product and notice that Stripe is still the default gateway
  6. Navigate to My Account > Payment Methods and delete the Stripe saved card
  7. Repeat step 4
  8. Attempt to purchase a product again and notice that the correct gateway, as defined in the Gateway Order Display is selected

Using WooCommerce 2.6.3 and Stripe 3.0.2

@gedex


  • Issue assigned to next milestone.
  • Issue assigned a priority (will be assessed by maintainers).

Cards: Unable to add new card outside of checkout

What I expected

I expected to be able to go to example.com/add-payment-method to add a Stripe credit card to my Stripe account and then immediately see the new card that was added.

What happened instead

Weird Bug: After saving new cards with either the add new payment method (or just in checkout), the example.com/payment-methods/ doesn't show the newly added card(s) (example: https://cloudup.com/c1P73p_IF_E), until I add a new item to the cart, and load the checkout page. On the checkout page the new cards show - and then if I reload example.com/payment-methods/ even without completing the checkout - it shows all the cards that have been added (no matter what they were added by).

Using:
• Storefront 2.0
• Woocommerce 2.6 Beta 3
• WooCommerce Stripe Payment Gateway 3.0 (latest commit as of today)

Declare Live Secret Key as a Secure Field

I've submitted a patch for WooCommerce Core that would allow for plugins to declare settings fields as secure: woocommerce/woocommerce#11946 . This allows other plugins to then secure the keys prior to storage.

To enable this, we simply put a 'secure' => true, into the field array. Then when getting the settings in the construct, we run through the fields, look for a secure field and then apply the filter as needed. Also in the API we put in a filter on the live_secure_key get_option so it can work as expected.

The pull request will come right after this. I've got a few discussion points on the specifics of the code that I can discuss on it.

Fatal error on adding card to payment methods if declined

When a credit card is declined while adding it to the saved payment methods via My Accounts, a PHP fatal error is generated.

Steps to reproduce:

  1. Go to /my-account/payment-methods/
  2. Click "Add payment method"
  3. Fill in card details, using credit card number 4000000000000002 (one of Stripe's test cards, should return "Charge will be declined with a card_declined code")
  4. Click "Add payment method" to submit the form

Tested this with another Stripe test card for simulating successful transactions; this card was added successfully as a payment method.

Tested on Stripe 3.0.2 (original forum post) and on Stripe 3.0.5 with minimal plugins.

Error:

[27-Sep-2016 20:11:49 UTC] PHP Fatal error: Uncaught exception ‘Exception’ with message ‘Your card was declined.’ in /nas/content/live/test2findcra/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-gateway-stripe.php:544
Stack trace:
#0 /nas/content/live/test2findcra/wp-content/plugins/woocommerce/includes/class-wc-form-handler.php(369): WC_Gateway_Stripe->add_payment_method()
#1 [internal function]: WC_Form_Handler::add_payment_method_action(Object(WP))
#2 /nas/content/live/test2findcra/wp-includes/plugin.php(600): call_user_func_array(Array, Array)
#3 /nas/content/live/test2findcra/wp-includes/class-wp.php(738): do_action_ref_array(‘wp’, Array)
#4 /nas/content/live/test2findcra/wp-includes/functions.php(963): WP->main(”)
#5 /nas/content/live/test2findcra/wp-blog-header.php(16): wp()
#6 /nas/content/live/test2findcra/index.php(17): require(‘/nas/content/li…’)
#7 {main}
thrown in /nas/content/live/test2findcra/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-gateway-stripe.php on line 544

Originally reported here: https://wordpress.org/support/topic/declined-card-throws-500-error/

Different behaviour for card_declined errors

Hi!

I noticed with the old version 2.6.12 when user gets a “card_declined”:

– Order is saved, set to “Failedhttp://screencast.com/t/IpVGllHzO
– Admin receives a “Failed order” notification
– User can try again and again, this will NOT generate new orders (just 1 order instance)
– After a successful payment the status of the same order is set to “Processing”

Now with the new version 3.0.2 when user gets a “card_declined”:

– Order is saved, set to “On hold
– Admin nor client receives NO email notifications of a failed order
– User can try again and again, every try will generate a new order!
– After a successful payment another new order will be generated which is set to “Processing” http://screencast.com/t/N9YVUIs2KBA6

Could this be a bug? It is much cleaner when only 1 order instance is used, “Failed” is much more appropriate for a declined error, and a failed order notification to admin would be very appropriate as well !

Credit Cards get always saved if feature is enabled

What I expected

If the option to save credit card details is activated in the admin the credit card only get's saved if the checkbox is enabled

What happened instead

The customer choice gets ignored and the card is always saved!

Reason

$maybe_saved_card = ! isset( $_POST['wc-stripe-new-payment-method'] ) || ! empty( $_POST['wc-stripe-new-payment-method'] );

-> ! isset( $_POST['wc-stripe-new-payment-method'] )

results too true if the key isn't present which happens on a normal submit with storefront theme ...


  • Issue assigned to next milestone.
  • Issue assigned a priority (will be assessed by maintainers).

Gateway not works in regular mode (not stripe checkout)

What I expected

proceed to checkout without errors, for now stripe token is missing

What happened instead

default checkout submit is initiated before stripe actually retrieve proper token. Token is populated into form AFTER checkout submit request. There's no hook to prevent submission on entire checkout form. I made breakdown in js for myself. Checkout submit not contains stripe token, it's added after getting back errors (they are caused with missing stripe token).

Everything work well with stripe checkout enabled but i want to handle it with regular cc fields.

Steps to reproduce the issue

Plugin version: 3.0.2
Woocommerce version: 2.6.4
WP version: 4.6.1

all is up to date, no other plugins that affect on submit process.


  • Issue assigned to next milestone.
  • Issue assigned a priority (will be assessed by maintainers).

Add 'go to setting' CTA if keys are empty

Since WC 2.6 offer Stripe installation via on-boarding wizard, it'd be helpful to render notice info that directs merchant to Stripe checkout setting.

Proposed wording:

Stripe is almost ready.*​ To get started, connect your Stripe account.

and then link the “connect your Stripe” text to the settings screen for the gateway.

Change to error message text when no card info entered

Hi guys,

When a customer doesn't enter any card info in the stripe form on the checkout page (integrated form, NOT the checkout.js version), the error message they see is "Could not find payment information". Could you please change this to something more consumer friendly, eg. "Please enter your card information"?

Cheers

Remove SSL notice when in 'test mode'

"Stripe is enabled, but the force SSL option is disabled; your checkout may not be secure! Please enable SSL and ensure your server has a valid SSL certificate - Stripe will only work in test mode."

Either add a filter to optionally remove this notice, or don't display it when the plugin is already in test mode. Would be helpful with all the local dev setups to not see this all the time.

Missing argument 1 for WC_Stripe_Customer::create_customer()

The following warning shows up frequently in our logs:

ErrorException: Missing argument 1 for WC_Stripe_Customer::create_customer(), called in /home/defender-pro_com/www/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-customer.php on line 167 and defined
  File "/home/defender-pro_com/www/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-customer.php", line 124, in handleError
    public function create_customer( $args ) {
  File "/home/defender-pro_com/www/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-customer.php", line 124, in create_customer
    public function create_customer( $args ) {
  File "/home/defender-pro_com/www/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-customer.php", line 167, in add_card
    if ( ( $response = $this->create_customer() ) && is_wp_error( $response ) ) {
  File "/home/defender-pro_com/www/wp-content/plugins/woocommerce-gateway-stripe/includes/legacy/class-wc-gateway-stripe.php", line 368, in get_source
    $stripe_source = $stripe_customer->add_card( $stripe_token );
  File "/home/defender-pro_com/www/wp-content/plugins/woocommerce-gateway-stripe/includes/legacy/class-wc-gateway-stripe.php", line 431, in process_payment
    $source = $this->get_source( get_current_user_id(), $force_customer );
  File "/home/defender-pro_com/www/wp-content/plugins/woocommerce/includes/class-wc-checkout.php", line 643, in process_checkout
    $result = $available_gateways[ $this->posted['payment_method'] ]->process_payment( $order_id );
  File "/home/defender-pro_com/www/wp-content/plugins/woocommerce/includes/class-wc-ajax.php", line 450, in checkout
    WC()->checkout()->process_checkout();
  File "/home/defender-pro_com/www/wordpress/wp-includes/plugin.php", line 525, in do_action
    call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
  File "/home/defender-pro_com/www/wp-content/plugins/woocommerce/includes/class-wc-ajax.php", line 82, in do_wc_ajax
    do_action( 'wc_ajax_' . sanitize_text_field( $action ) );
  File "/home/defender-pro_com/www/wordpress/wp-includes/plugin.php", line 525, in do_action
    call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
  File "/home/defender-pro_com/www/wordpress/wp-includes/template-loader.php", line 12, in require_once
    do_action( 'template_redirect' );
  File "/home/defender-pro_com/www/wordpress/wp-blog-header.php", line 19, in require
    require_once( ABSPATH . WPINC . '/template-loader.php' );
  File "/home/defender-pro_com/www/index.php", line 17
    require( __DIR__ . '/wordpress/wp-blog-header.php' );

During payment processing spinner is not visible on mobile

What I expected

On submitting the credit card form I expected to see a ui block with a spinner.

What happened instead

A white overlay appears only blocking the form with no indication of activity. On themes with sticky headers this header is not blocked, header navigation is still possible.

Steps to reproduce the issue

Checkout on mobile

Suggestions

See \woocommerce-gateway-stripe\assets\js\stripe.js lines 70 ~ 150

Currently the UI block is applied to the form which is above the screen when pressing the checkout button.

Our solution is to create a second full UI blocking function (call blockUI without an element) and only use this function on submission of the form.

See our hacky solution below. I'm sure you can come up with something better!

Block functions:

block: function() {
wc_stripe_form.form.block({
message: null,
overlayCSS: {
background: '#fff',
opacity: 0.6
}
});
},

    fullBlock: function() {
        $.blockUI({
            message: null,
            overlayCSS: {
                background: '#fff',
                opacity: 0.6
            }
        });
    },

    unblock: function() {
        wc_stripe_form.form.unblock();
        $.unblockUI();
    },

During submit:

onSubmit: function( e ) {
if ( wc_stripe_form.isStripeChosen() && ! wc_stripe_form.hasToken() ) {
e.preventDefault();
wc_stripe_form.fullBlock();

Detect event from Woocommerce:

$( document.body ).on( 'checkout_error', function() {
    $.unblockUI();
});

Translate error codes

What I expected

Error messages on failure of payment are returned in english. They should be translatable.

Below a defined list of error codes

invalid_number  The card number is not a valid credit card number.
invalid_expiry_month    The card's expiration month is invalid.
invalid_expiry_year The card's expiration year is invalid.
invalid_cvc The card's security code is invalid.
incorrect_number    The card number is incorrect.
expired_card    The card has expired.
incorrect_cvc   The card's security code is incorrect.
incorrect_zip   The card's zip code failed validation.
card_declined   The card was declined.
missing There is no card on a customer that is being charged.
processing_error    An error occurred while processing the card.

https://stripe.com/docs/api#errors

Disallow Prepaid Debit Cards

What I expected

The option for store owners to disallow the use of Prepaid Debit Cards.

What happened instead

There is no way to disallow. Please see this reference per Dwain.

Ticket: #458946

  • Issue assigned to next milestone.
  • Issue assigned a priority (will be assessed by maintainers).

Validate Keys

This is the second time I've seen this issue now. Users will sometimes accidentally swap their test credentials with their live credentials.

woocommerce_settings_ easy_photo_class _wordpress

If we could write some very basic validation we could help users figure this out. Also help ourselves figure this out.

  • make sure that test keys have test in them
  • make sure that live keys have live in them

Would be nice to use JS to do this to let users know immediately when they make a mistake rather than tell them about 4 mistakes after they save the page.

Stripe Checkout broken after extension update

What I expected

With Stripe Checkout enabled, click the Proceed to payment button and the Stripe payment form appears as an overlay.

What happened instead

Click the Proceed to payment button and the page scrolls to the top then shows the error:

Please enter your card details to make a payment. Developers: Please make sure that you are including jQuery and there are no JavaScript errors on the page.

I'm also seeing a javascript error in Safari's web tools:

ReferenceError: Can't find variable: $required_inputs

stripe-checkout-error

#### Steps to reproduce the issue

I disabled all plugins except WooCommerce and Stripe 3.0.4 then went through the checkout process. This was also happening in a prior version but I'm not sure if it was 3.0.2 or 3.0.3. The problem was fixed when I rolled back to version 3.0.0.

There's a post with a possible fix over in the WordPress support forums that looks like it could be this same issue. https://wordpress.org/support/topic/v3-0-4-breaks-checkout-button-developers-xxx/

Compatibility w/Pre Orders

What I expected

For my WooCommerce Pre-Orders to be in a pre-order status when paying with stripe - see ticket: #430712-zd-woothemes

What happened instead

With the combination of WooCommerce 2.5.5 (edited, version doesn't seem to matter), Subscriptions (edit - added subscriptions to the mix), Pre-Orders 1.4.5 and Stripe >= 3.0.0 pre-order items have their payment collected immediately

Steps to reproduce the issue

  1. WooCommerce 2.5.5 (or below I presume) is installed and active
  2. Pre-orders installed & active
  3. Stripe at 3.0 to 3.0.2
  4. A product is configured as a pre-order product available for some time in the future and "when to charge" is set for "Upon Release"
  5. Pre-order that product and complete the checkout process.
  6. See that the order is in a processing status and the pre-order associated with that order is not active.

updating to WooCommerce 2.6 installing/activating Subscriptions will solve this as will downgrading to Stripe 2.6.12

@mdmoore @gedex


  • Issue assigned to next milestone.
  • Issue assigned a priority (will be assessed by maintainers).

No address check via stripe_checkout.js

What I expected

When the Enable Stripe Checkout box is checked, the form in the modal popup checks the billing address.

What happened instead

When the Enable Stripe Checkout box is checked, the form in the modal popup checks only the origin and CVC

Steps to reproduce the issue

In a live environment, check the Stripe Checkout box and then enter credit card information in the modal popup on front-end checkout.

Relevant code at line 110 of https://github.com/woothemes/woocommerce-gateway-stripe/blob/master/assets/js/stripe_checkout.js:

StripeCheckout.open({
                    key               : wc_stripe_params.key,
                    address           : false, 

  • Issue assigned to next milestone.
  • Issue assigned a priority (will be assessed by maintainers).

JCB credit cards

What I expected

the woocommerce stripe gateway accepts JCB credit cards

What happened instead

when entering a JCB card, the stripe modal popup just blinks, gives no auth, no error, to denial message, no processing indicator. The gateway is sending nothing to Stripe...there is no record of the attempt on the Stripe site.

Steps to reproduce the issue

Using Stripe gateway 3.0.2.
woocommerce 2.6.4
WordPress 4.6
VISA and AmEx cards auth and capture with no problem. With the same setup and same processes for JCB I get no response from the woocommerce strip gateway.

All the documentation indicates JCB is accepted. Please help.

Thanks,
Craig

PLEASE NOTE

  • These comments won't show up when you submit the issue.
  • Everything is optional, but try to add as many details as possible.
  • Screenshot worth a thousand words, use screenshots if possible.
  • If requesting a new feature, explain why you'd like to see it added.
  • Please apply appropriate labels on the issue
    -->

  • Issue assigned to next milestone.
  • Issue assigned a priority (will be assessed by maintainers).

Error with localization

Wrong object returned from stripe is being used, causing localised error messages to not display.

stripe.js l:93

Broken:

if ( wc_stripe_params.hasOwnProperty( responseObject.response.error.code ) ) {
message = wc_stripe_params[ responseObject.response.error.code ];
}

Fixed:

if ( wc_stripe_params.hasOwnProperty( responseObject.response.error.type ) ) {
message = wc_stripe_params[ responseObject.response.error.type ];
}

Source: https://wordpress.org/support/topic/error-message-localization-broken/

WC Not Receiving Stripe Response?

Hi,

I'm having an intermittent issue with some orders, where the plugin makes the request to Stripe, Stripe charges the customer, and then... nothing. I seems like the plugin doesn't receive a response, or quits listening for one.

I'm at a bit of a loss here since I don't see how it could just stop working between lines 57 and 71 in class-wc-stripe-api.php.

Things I've checked/tried:

  • Timeouts aren't the issue. Stripe processed the charges in under 5s, and the plugin is set to wait for 70s. The server has a 60s timeout.
  • Absolutely no errors related to this in the server logs
  • The Stripe transactions with issues are identical to ones without, except for the transaction ID. (Including the product charged, the price, and customer, etc.)

I'm not sure if this is even an issue with the plugin, but since I can't reproduce it reliably, it's very hard to debug. I'm hoping this rings a bell for someone who can either identify the issue or point me in a direction to narrow down the problem.

Thank you

Random Radio Button Appearing in Test Mode

What I expected

We have Stripe and Check as payment options. This radio seems to trigger the check payment method, however the label is missing. I expected the label to display.

screen-shot-2016-09-29-at-6 22 37-pm

#### What happened instead

The label for check payment is missing.

Steps to reproduce the issue

Enable Stripe and Check payment methods.
Enable test mode for Stripe.
Go to checkout.


  • Issue assigned to next milestone.
  • Issue assigned a priority (will be assessed by maintainers).

Fatal error when trying to save a card

PHP Fatal error:  Call to a member function get_error_code() on a non-object in /srv/www/wordpress-default/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-customer.php on line 177

Add 3D Secure

As of this writing, 3D secure is in beta. Adding this would be a good feature.

Create an easy way to delete the customer ID for Stripe in the customer profiles.

What I expected

Would love an easy way for someone to delete the Stripe customer profile that is created by Stripe and saved in WooCommerce.

What happened instead

This has to be done in the database, which can be daunting to many of our users. The typical use case is when someone uses their own user for testing purposes, which has a test mode user created in Stripe. When they move the gateway to live, they need to delete the Stripe customer associated with the WordPress user in order to be able to test the live mode, but it's almost easier for them to just delete the entire WordPress user than find the row in wp_usermeta.

What I would love to see is the row showing the Stripe customer info in the users' page in WordPress, but obviously I defer to y'all :)

CC: @gedex

Customizable Credit Card Icons

Users should be able to customize the credit card icons they accept.

We've simplified it to if you accept USD you should display all CC icons but that's an oversimplification. There are Canadian accounts which accept USD and they can only accept: Visa, Mastercard, & Amex.

$icon  = '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/visa' . $ext ) . '" alt="Visa" width="32" ' . $style . ' />';
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/mastercard' . $ext ) . '" alt="Mastercard" width="32" ' . $style . ' />';
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/amex' . $ext ) . '" alt="Amex" width="32" ' . $style . ' />';
if ( 'USD' === get_woocommerce_currency() ) {
    $icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/discover' . $ext ) . '" alt="Discover" width="32" ' . $style . ' />';
    $icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/jcb' . $ext ) . '" alt="JCB" width="32" ' . $style . ' />';
    $icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/diners' . $ext ) . '" alt="Diners" width="32" ' . $style . ' />';
}

Rather than trying to keep up with what types of Stripe accounts & currencies accept which types of cards we should let users display the CC icons they want to display.

Originally from: https://woothemes.zendesk.com/agent/tickets/434817

Potential issues with automatic retry of subscription payments

What I expected

The Stripe customer/card tokens set on a subscription to be honoured when processing renewal payments.

What happened instead

The customer ID stored in user meta against the subscription's customer_user was used when the payment failed using the customer/card tokens set on the subscription.

Steps to reproduce the issue

  1. Purchase or manually create a subscription with Stripe as the payment method
  2. Change the customer and card ID on the subscription to invalid tokens (e.g. https://cloudup.com/cBsC0D_2Fmv)
  3. Process a renewal payment for the subscription
  4. Observe that the payment processed correctly

Background & Issues

SHA: fb1cdf4 introduced a basic retry system to scheduled_subscription_payment() which would fallback to use the Stripe customer token set in user meta if the payment fails, for any reason, using customer/card tokens set on the subscription.

This becomes an issue if the customer was expecting to be able to use certain cards for certain subscriptions. For example, a customer may use a company credit card for one subscription, while using a personal card for other purchases in the same store. Or one customer may purchase a subscription for someone else and use that person's credit card for the payments instead of their own (like you might do for your grandmother to save her having to mess with the tech). (These issues aren't entirely new, Stripe has defaulted to user meta for getting a customer ID for a long time, but only when there was no customer/card token set on the subscription, not whenever a payment fails for any reason).

Subscriptions is introducing its own retry system into v2.1 (for full details, see: https://github.com/Prospress/woocommerce-subscriptions/pull/1298). While that is quite a different approach and not quite as elegant as this one (as it has to be payment gateway agnostic), it's probably a sufficient substitute to the system introduced with SHA: fb1cdf4.

Because of these issues and the impeding alternative, I think this retry system should be removed from scheduled_subscription_payment().

If you guys agree, let me know and I'll submit a PR. 😄


  • Issue assigned to next milestone.
  • Issue assigned a priority (will be assessed by maintainers).

Stripe returns white screen when CVC is wrong

What I expected

If a customer by mistake enteres a wrong CVC, I expected to see an error message they can correct their mistake.

What happened instead

Instead, the user gets a white screen.

Fatal error: Uncaught exception 'Exception' with message 'Your card's security code is incorrect.' in /storage/content/81/151281/japanmysterybox.com/public_html/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-gateway-stripe.php:544

Steps to reproduce the issue

On the the My Account page, select the Payment Methods tab.
Click "Add Payment Method"
Use the card number 4000000000000127 (following these testing card numbers: https://cloudup.com/c0EOTyt_3rM)


https://cloudup.com/cYQ_nbrwOKa

Use an expiry and CVC then click Add Card.

Voilá, white screen.

It seems to work when Stripe is in test mode, but doesn't work when live (tested by ProsPress)

459374-zd-woothemes


  • Issue assigned to next milestone.
  • Issue assigned a priority (will be assessed by maintainers).

Partial payment isn't honored with Account Funds

What I expected

When Partial Payments is enabled in the WooCommerce Account Funds plugin settings, I would expect only 4 GBP to be charged via Stripe as 32 GBP were paid for via Account Funds:

2016-09-08_08-45-56

What happened instead

The Account Funds were removed from the user's account, which is correct, but the full amount of 36 GBP was send to Stripe:

The Stripe log says the following:

09-08-2016 @ 06:45:56 - Info: Begin processing payment for order 587 for the amount of 36

Here's the Stripe dashboard:

2016-09-08_08-58-12

Steps to reproduce the issue

  1. Ensure that Partial Payment is enabled on the Account Funds setting
  2. Ensure that the current user has funds on their account
  3. Add products to the cart with a total value greater than the amount of funds on the account
  4. Choose to pay part of the payment with account funds
  5. Choose to pay the remainder with Stripe
  6. Complete checkout

466156-zd-woothemes

Any Reason for two XHR Requests to https://api.stripe.com/v1/tokens

What I expected

If i submit the Form the card get checked once with https://api.stripe.com/v1/tokens
https://api.stripe.com/v1/token

What happened instead

the request to https://api.stripe.com/v1/tokens is done twice

Possible reason

onSubmit is fired twice -> https://github.com/woothemes/woocommerce-gateway-stripe/blob/master/assets/js/stripe.js#L28

once for submit
and once for checkout_place_order_stripe because of https://github.com/woothemes/woocommerce/blob/f4a30e3be630caad8c8c0392885a136ed4fd9f67/assets/js/frontend/checkout.js#L349

is this done on purpose or a bug?


  • Issue assigned to next milestone.
  • Issue assigned a priority (will be assessed by maintainers).

PHP Notice: Trying to get property of non-object

Here's the notice:

PHP Notice:  Trying to get property of non-object in /srv/www/wordpress-default/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-gateway-stripe.php on line 488

I believe $source->source is a string, containing token, instead of an object.

Add an order description filter

submitted by @danieldudzic on old repo

Not sure, if this is something we want to add, but thought I'd pass it along for review.

A customer needed to have specific order information from Product Add-ons added to every order in the Stripe UI.
I was hoping for a filter close to line 547 in the file class-wc.gateway-stripe.php but to no avail.
This means I had to edit this file directly, and changed the line below

"$post_data['description'] = sprintf( __( '%s - Order %s', 'woocommerce-gateway-stripe' ), wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ), $order->get_order_number() );"

in order to get the specific information my client wanted.
Anyhow, I was wondering if there is a chance to add a filter just for description, as I think I can't be the only one wanting this.

So, please add a filter to the Stripe order description and include the current $order so I am able to extract my needed information.

Link to the ticket: https://woothemes.zendesk.com/agent/tickets/408464

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.