Giter Site home page Giter Site logo

pmclain / module-stripe Goto Github PK

View Code? Open in Web Editor NEW
47.0 11.0 21.0 297 KB

Stripe Payments for Magento 2

License: Open Software License 3.0

PHP 86.91% JavaScript 8.24% HTML 2.44% Shell 1.60% Dockerfile 0.81%
stripe-payment stripe magento-extension magento2

module-stripe's Introduction

Magento 2 Stripe Integration

Build Status Coverage Status Latest Stable Version Total Downloads License

Accept credit card payments through the Stripe payment gateway.

  • Supports Magento Instant Purchase for One Click Checkout
  • Securely accept customer payments using the Stripe.js tokenization when collecting all payments.
  • Provide customers option of storing payment information for future transactions.
  • Stored customer card information can be used for orders created in the frontend or backend.
  • Stored cards deleted by customer in Magento are also removed from the corresponding Stripe customer profile.
  • New payments can be authorize or authorize and capture.
  • Authorized payments can be captured online during invoice creation.
  • Full and partial refund support when creating credit memos.
  • 3D Secure support for one-time and vault payments

Installation

Composer

In your Magento 2 root directory run
composer require pmclain/module-stripe
bin/magento setup:upgrade

Magento Version Requirements

Release Magento Version
2.1.x >=2.2.5
2.0.x 2.2.0-2.2.4
1.x.x   2.1.x          
None 2.0.x

Configuration

The configuration can be found in the Magento 2 admin panel under
Store->Configuration->Sales->Payment Methods->Stripe

Feature Roadmap

There is no ETA for implementation, but here is the list in order of priority.

  1. Multi-shipping address support
  2. Stripe Radar

Testing and Local Development

WARNING The docker setup included is intended for local development only.

Local Development

cd ./dev
docker-compose up -d docker-compose exec app module-installer
docker-compose exec app magento-installer

Create the host entry 127.0.0.1 stripe.docker

Execute Tests

  • Setup
    docker-compose -f dev/docker-compose.yml up -d
    docker-compose -f dev/docker-compose.yml exec app module-installer
  • Unit - docker-compose -f dev/docker-compose.yml exec app test-unit
  • Integration - docker-compose -f dev/docker-compose.yml exec app test-integration
  • Acceptance - docker-compose -f dev/docker-compose.yml exec app test-acceptance

License

Open Software License v3.0

module-stripe's People

Contributors

archipel avatar damjess avatar performadigital avatar pmclain 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

module-stripe's Issues

Error install

Problem 1
- Conclusion: remove magento/product-community-edition 2.1.13
- Conclusion: don't install magento/product-community-edition 2.1.13
- Installation request for pmclain/module-stripe ^2.0 -> satisfiable by pmclain/module-stripe[v2.0.0].
- Installation request for magento/product-community-edition 2.1.13 -> satisfiable by magento/product-community-edition[2.1.13].
- magento/product-community-edition 2.1.13 requires magento/framework 100.1.13 -> satisfiable by magento/framework[100.1.13].
- Can only install one of: magento/framework[101.0.5, 100.1.13].
- Can only install one of: magento/framework[101.0.5, 100.1.13].
- Can only install one of: magento/framework[100.1.13, 101.0.5].
- pmclain/module-stripe v2.0.0 requires magento/framework ~101.0.0||~100.3.0-dev -> satisfiable by magento/framework[101.0.0-rc21, 101.0.0-rc22, 101.0.0-rc23, 101.0.0-rc30, 101.0.0, 101.0.1, 101.0.2, 101.0.3, 101.0.4, 101.0.5].
- magento/framework 101.0.0-rc21 requires composer/composer 1.4.1 -> satisfiable by composer/composer[1.4.1].
- magento/framework 101.0.0-rc22 requires composer/composer 1.4.1 -> satisfiable by composer/composer[1.4.1].
- magento/framework 101.0.0-rc23 requires composer/composer 1.4.1 -> satisfiable by composer/composer[1.4.1].
- magento/framework 101.0.0-rc30 requires composer/composer 1.4.1 -> satisfiable by composer/composer[1.4.1].
- magento/framework 101.0.0 requires composer/composer 1.4.1 -> satisfiable by composer/composer[1.4.1].
- magento/framework 101.0.1 requires composer/composer 1.4.1 -> satisfiable by composer/composer[1.4.1].
- magento/framework 101.0.2 requires composer/composer 1.4.1 -> satisfiable by composer/composer[1.4.1].
- magento/framework 101.0.3 requires composer/composer 1.4.1 -> satisfiable by composer/composer[1.4.1].
- magento/framework 101.0.4 requires composer/composer 1.4.1 -> satisfiable by composer/composer[1.4.1].
- Conclusion: don't install composer/composer 1.4.1

Issue with the test payment

When trying to process a test payment, I'm getting a 500 error on the following file,
/rest/default/V1/guest-carts/0810259eed24dfa520155452df583f7b/payment-information

Am I missing something here?

CC validation always fails

When I enter any CC number, real or testing validation always fails.
I tracked problem down to 'validate-card-type' validation and 'allowedTypes' array;
It contains: [{"value":"AE","type":["American Express","American Express"]},{"value":"VI","type":["Visa","Visa"]},{"value":"MC","type":["MasterCard","MasterCard"]}]
Problem is 'type' field, it contains array with two identical elements, and in /Magento_Payment/js/model/credit-card-validation/validator.js code tries to match entered card type to one of the cards in 'allowedTypes'. And it always fails because of string == array comparision...

if (cardInfo.title == allowedTypes[i].type) {

I have another Stripe module installed, it works perfectly, but this - isn't...

SCA

Hi there,

I know you're looking to put the module to bed but wondered if you were looking at SCA over Stripe API and what that might involve?

installation issue

i am trying to install extension but its giving me error of URL authentication through composer please check the screenshot. Can you please help rectify this issue. Thanks
fullsize_distr

Fatal error: Trait

I have installed the stripe plugin for my website which I am building. It was working fine for the past few days and suddenly I have received an error when I tried to compile the project. The error is the following

Fatal error: Trait 'Pmclain\Stripe\Helper\Payment\Formatter' not found in /var/www/html/web_dms_ecommerce/vendor/pmclain/module-stripe/src/Model/Adapter/Payment/FormatterTest.php on line 23

Checkout messages are not the ones returned by Stripe

Using the Stripe testing keys, I went ahead and tried to test some of the errors that Stripe provides as example in their dev docs, and the messages shown in the checkout are not the ones returned by Stripe.

Example Card : 4000000000000069
Should give out message: "Your card is expired"
Message it actually gives: Transaction has been declined. Please try again later.

Cannot use Magento\Braintree\Gateway\Request\PaymentDataBuilder as PaymentDataBuilder because the name is already in use in /home/bventureuser/public_html/vendor

When installed this module, it was showing header and footer on checkout page with scattered design.
Also when running setup di compile I am getting the following error in error_log file:

Cannot use Magento\Braintree\Gateway\Request\PaymentDataBuilder as PaymentDataBuilder because the name is already in use in /home/bventureuser/public_html/vendor

Compatibility with 2.2.6 ?

Hey do you have any ETA about adding compatibility with 2.2.6 version of Magento which include huge security fixes ?

Postcode/Zip verification

When entering a card number the form then also asks for a postcode. The form allows the user to enter the postcode with a space, the stripe API also accepts it with the space. Verification fails as stripe store postcodes without a space. Seems the spaces need to be stripped from the postcode data sent to stripe.

No Support for Zero-Decimal Currencies

Hi,

I don't understand the purpose of the file Pmclain\Stripe\Helper\Payment\Formatter.
In my case, the price is multiplied by 100 as the decimals separator is removed and then, in my stripe test account, all the totals are x100. Is it expected?

Thanks.

Fatal Error: 'Uncaught Error: Class 'Stripe\\Stripe' not found

"Fatal Error: 'Uncaught Error: Class 'Stripe\Stripe' not found in /home/mustperf/public_html/MUSTPERFUME.CO.UK/app/code/Pmclain/Stripe/Model/Adapter/StripeAdapter.php:47\nStack trace:\n#0 /home/mustperf/public_html/MUSTPERFUME.CO.UK/app/code/Pmclain/Stripe/Model/Adapter/StripeAdapter.php(42): Pmclain\Stripe\Model\Adapter\StripeAdapter->initCredentials()\n#1 /home/mustperf/public_html/MUSTPERFUME.CO.UK/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Pmclain\Stripe\Model\Adapter\StripeAdapter->__construct(Object(Pmclain\Stripe\Gateway\Config\Config))\n#2 /home/mustperf/public_html/MUSTPERFUME.CO.UK/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Pmclain\\Stripe\\...', Array)\n#3 /home/mustperf/public_html/MUSTPERFUME.CO.UK/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Pmclain\\Stripe\\...')\n#4 /home/mustperf/public_html/MUSTPERFU' in '/home/mustperf/public_html/MUSTPERFUME.CO.UK/app/code/Pmclain/Stripe/Model/Adapter/StripeAdapter.php' on line 47"

dashboard.stripe.com have a proper log for a request that means there is no any API issue. The issue is from your code. can you please guide or fix this issue ASAP.

magento 2.0 support

IS this module support in Magento 2.0 because at compile time its give error of magento core module of vault.

Existing customers unable to checkout

Hi Patrick

An interesting problem has cropped up that I have struggled to track down. Some existing customers who are registered on the site are unable to checkout using stripe. They enter their card details and click place order and just get the spinning progress wheel that goes nowhere.

I tried looking at logs in magento and stripe but neither report any errors. After some digging the only thing I can find is that the customers experiencing problems seem to be those that registered while the site was still using Magento 1.9. Looking at their accounts there seems to have been a change with how address are created, on Magento 1.9 if a customer's billing and shipping address were the same there was a single address entry that marked as being default shipping and billing. New accounts now have 2 separate entries with the same address.

I'm not sure how you call the address information but I am guessing that it doesn't like there being only a single address entry for a customer. This could be a Magento issue but other checkout methods such as paypal seem to work fine so I am guessing you may be using a different method to get the address details than the paypal module does.

Magento 2.2.4 new install causing sitewide errors

Any idea why this would be?

My rewrite rules seem to be changed and I can no longer access my admin url after installing the module according to your instructions. http://51.15.244.167/

This version of magento from today: Magento-CE-2.2.4_sample_data-2018-05-01-09-51-36.tar.gz

Linux/ARM64/Ubuntu Xenial

pmclain/module-stripe v2.1.1 requires magento/framework ~101.0.5||~100.3.0-dev -> no matching package found

Hi,

We've recently upgraded to the latest version of Magento - 2.3 and as a result when running composer require for the package we get an error, details below:

Command:
composer require pmclain/module-stripe

Error:
Problem 1
- pmclain/module-stripe v2.1.1 requires magento/framework ~101.0.5||~100.3.0-dev -> no matching package found.
- pmclain/module-stripe v2.1.0 requires magento/framework ~101.0.5||~100.3.0-dev -> no matching package found.
- Installation request for pmclain/module-stripe ^2.1 -> satisfiable by pmclain/module-stripe[v2.1.0, v2.1.1].

Potential causes:

We've had to remove it for now, is there a known fix or an issue already open for this?

Thanks,

cant see stripe on checkout

stripe extension is successfully installed and js component seem to be loaded fine.
but the unable to see on checkout page.
there is no one-step-checkout extension installed and magento v2.2.5

Bill-to and Payment Method Not Being Set For Invoices

Hi there,

We're having a bit of a strange issue where when using the Stripe payment method on our Magento 2.1.11 site the Bill-to and Payment Method fields are not being populated. When testing this with other payment methods the data is set correctly.

This occurs not only on the Invoice admin grid but also when viewing the individual invoice. The billing address does appear to be set.

These orders are for virtual products which might be causing part of the issue?

Also to note in our test environment our admin users are using the en_US locale with the frontend being en_GB, which possibly could cause currency issues but that shouldn't be an issue I'd of thought.

Any ideas?

image

Could not determine which URL to request: Stripe\Source instance has invalid ID:

Hello,
just installed this module in my Magento 2.2.6, on place older submit get this error:

Could not determine which URL to request: Stripe\Source instance has invalid ID: {"exception":"[object] (Stripe\Error\InvalidRequest(code: 0): Could not determine which URL to request: Stripe\Source instance has invalid ID: at /vendor/stripe/stripe-php/lib/ApiResource.php:119)"} []

Official Stripe Solution Available

Stripe has developed an official Magento 2 module https://marketplace.magento.com/stripeofficial-stripe-payments.html This issue will be used for documenting the roadmap for deprecating this module and providing a migration path to the official integration.

Required Migrations

  • Magento_Vault payments - If possible stored payment methods from this module should remain available to users after switching to the official module
  • Stripe/Magento customer associations - I haven't reviewed the official module to know if this will be needed. My assumption is that the Stripe customer token attribute used by this module needs to be copied to the equivalent attribute in the new module.

These should be made available by January 2019

Order Cancellation Failed

I created an order using my own card details to troubleshoot problems with API key error messages. The stripe plugin 'Payment Action' is set to 'Authorize Only' so that orders can be cancelled before payment is fully processed via Stripe.

When trying to cancel the order in Magento I get a message saying 'You have not cancelled the order' then subsequent attempts to cancel the order then result in an error 'Charge xxx has already been refunded.' where xxx = the Stripe transaction reference. It would seem that the first attempt to cancel does indeed cancel the stripe transaction but then does not complete the Magento cancellation process, therefore leaving an order stuck in the Processing state and unable to cancel.

Guests cannot checkout

I am getting a response in console "
https://mydomainxxx.co.uk/rest/default/V1/guest-carts/0ea6a2d913c8bede97ebec8f8399bc6a/payment-information" Not found 500 error.
This happens after I click on Place order.

The jquery stop is at : xhr.send( ( options.hasContent && options.data ) || null );

The actual order is sent to Stripe by the way but the order is not listed in backend and process is stuck on frontend without any warning message but a red bar.

Nothing in debug also. My ver. is 2.2.3

Unsupported declare 'strict_types' in Magento V-2.3.0

The extension shows error:

Unsupported declare 'strict_types' in /../vendor/magento/inventory-composer-installer/src/Plugin.php on line 6
PHP Parse error: syntax error, unexpected ':', expecting ';' or '{' in /../vendor/magento/inventory-composer-installer/src/Plugin.php on line 55"

Invalid Integer

Certain amounts such as 67.96 throw an Invalid Integer error.
I've created a hotfix in my Magento in file: vendor/pmclain/module-stripe/src/view/frontend/web/js/view/payment/method-renderer/pmclain_stripe.js on line 188. I changed this line to be Math.round(quote.totals().base_grand_total * 100)

Please could you push this as a fix or find another fix?

Getting network error

Hello,

After setting up the stripe module, when i try to make payment, i am getting the following error.

Unexpected error communicating with Stripe. If this problem persists, let us know at [email protected].\n\n(Network error [errno 77]: error setting certificate verify locations:\n CAfile: \n CApath: none)

How to resolve this issue?

Thanks,

Unknown error while placing order via stripe

Hello,

I am facing an unknown error while making order payment through stripe payment gateway.
I am using it in testing mode and when click on "Place Order" button it processes and show a red bar without any error.
Please check the below screenshot.

capture

How to resolve this error?

How to Update to newer version?

Hi Patrick,
How should i update to the newer version of your module?, i have the 1.1.0 version on my Magento 2.1.7 . working great, but sometimes with some international credits cards i have some problems. Maybe its because the stripe library.
Thank you so much.

Getting 500 (Internal Server Error)

Hello,
I am trying your Stripe module in my localhost Magento 2. My site url is like [my_machine_ip]/[project_name]. But I am continuously getting 500 internal server error while trying to place order. I have enabled Test mode and also have given Test secret key and publishable key. Can you please inform me for which reason is it happening?

Change design of Credit card form

Hello,
I want to change the form design of this module and want to make it like default credit card form. Can you please guide me how to change it?

Version 0.0.3 not support Magento version 2.0.15

Hi Pmclain,

This module is very helpful but there is difficulty for me.
As I investigate the 0.0.3 and Magento 2.0.15. Magento doesn't contain Magentuo_Vault and some elements. If I go to checkout, the page become blank and show error.

After I remove the Magento_Vault and try to put back <!-- ko template: 'Magento_Payment/payment/cc-form' --><!-- /ko --> to the form, the page works. However, at the payment page it returns an error.
Failed to load resource: the server responded with a status of 400 (Bad Request)
It fail to post JSON to the '/guest-carts/:quoteId/payment-information' and '/carts/mine/payment-information' page.

Thank you

Regards,
Tommy

Issue with installation (doctrine/instantiator 1.1.0 requires php ^7.1)

Hi there,

I've attempted to install your package via composer. I receive the following error:

I'm using PHP 7.0.x as Magento isn't supporting 7.1/7.2

I've tried Magento2 with 7.2 and get various errors (each() being depreciated)

Any ideas? Thanks!

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (7.0.27) does not satisfy that requirement.
    - doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (7.0.27) does not satisfy that requirement.
    - doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (7.0.27) does not satisfy that requirement.
    - Installation request for doctrine/instantiator (locked at 1.1.0) -> satisfiable by doctrine/instantiator[1.1.0].```

Upgrade module-vault dependency to version 100.2.1

I have upgraded Magento the the latest version, but I'd love to test your Stripe module, and I ran:
composer require pmclain/module-stripe

Got the following error:

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for pmclain/module-stripe ^0.0.4 -> satisfiable by pmclain/module-stripe[0.0.4].
- Conclusion: remove magento/module-vault 100.2.1
- Conclusion: don't install magento/module-vault 100.2.1
- pmclain/module-stripe 0.0.4 requires magento/module-vault 100.1.* -> satisfiable by magento/module-vault[100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1].
- Can only install one of: magento/module-vault[100.2.1, 100.1.0-rc1].
- Can only install one of: magento/module-vault[100.2.1, 100.1.0-rc2].
- Can only install one of: magento/module-vault[100.2.1, 100.1.0-rc3].
- Can only install one of: magento/module-vault[100.2.1, 100.1.0].
- Can only install one of: magento/module-vault[100.2.1, 100.1.1].
- Installation request for magento/module-vault (locked at 100.2.1) -> satisfiable by magento/module-vault[100.2.1].

Any chance it'll work just changing the version in composer.json, or is it actually not compatible as it stands?

I see that the paypal module needs version 100.2.1, I'm not planning to use paypal but I'm new to Magento and have not found a solution for how to remove the paypal module in order to downgrade the module-vault.

composer wont find anything to install

hello,

i ve tried to install it with the composer command you gave but the below message is what i get with no installation. I have magento 2.1.9, can you please advise?

thank you!

Using version ^1.1 for pmclain/module-stripe
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Package fabpot/php-cs-fixer is abandoned, you should avoid using it. Use friendsofphp/php-cs-fixer instead.
Package sjparkinson/static-review is abandoned, you should avoid using it. Use phpro/grumphp instead.
Generating autoload files

also when i run composer require stripe/stripe-php i get:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - pmclain/module-stripe 1.1.0 requires stripe/stripe-php ~5.8.0 -> satisfiable by stripe/stripe-php[v5.8.0] but these conflict with your requirements or minimum-stability.
    - pmclain/module-stripe 1.1.0 requires stripe/stripe-php ~5.8.0 -> satisfiable by stripe/stripe-php[v5.8.0] but these conflict with your requirements or minimum-stability.
    - pmclain/module-stripe 1.1.0 requires stripe/stripe-php ~5.8.0 -> satisfiable by stripe/stripe-php[v5.8.0] but these conflict with your requirements or minimum-stability.
    - Installation request for pmclain/module-stripe ^1.1 -> satisfiable by pmclain/module-stripe[1.1.0].


Installation failed, reverting ./composer.json to its original content.

Cant see stripe on checkout

Hi There
I have installed this module successfully. But I cant see Stripe payment on checkout where as I can see paypal.

Kindly help

Regards
Suneet

Unable do complete payment with saved card

I am getting critical error and can't place order with saved card details. I am getting below error:

main.CRITICAL: Could not determine which URL to request: Stripe\Source instance has invalid ID: {"exception":"[object] (Stripe\Error\InvalidRequest(code: 0):

Thanks!

Hi,
I've signed up to let you know that your extension rocks!

I also wanted to know if it was possible to display the card type used and/or last 4 digits of the card on Orders/Invoices etc?

Keep up the great work!

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.