Payment gateways no longer working after update

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
flomo
Posts: 52
Joined: 26 Sep 2019, 15:11

Payment gateways no longer working after update

Post by flomo » 03 May 2020, 18:39

I updated from Aimeos 2019.10 to 2020.4 (also ai-payments). Now when I check out with Stripe I only get the message "Could not find payment information". With Datatrans payment gateway I get a "... incorrect request !" message.

I then switched the aimeos/ai-payments and aimeos/aimeos-laravel dependencies to "dev-master" and did a "aimeos:setup". With Datatrans it stays the same. With Stripe I get a "Call to undefined method Omnipay\Stripe\Message\Response::getPaymentIntentReference()" error.

Are those gateways broken in all 2020.4 versions, or is there something wrong with my installation?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Payment gateways no longer working after update

Post by aimeos » 04 May 2020, 07:25

Which Omnipay version did you install? Can you post the output of "composer show"?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

flomo
Posts: 52
Joined: 26 Sep 2019, 15:11

Re: Payment gateways no longer working after update

Post by flomo » 04 May 2020, 07:36

For the payments I installed these packages: "academe/omnipay-datatrans": "^3.0", "aimeos/ai-payments": "^2020.04", "omnipay/stripe": "^3.1".

Here's the list of installed dependencies (reverted back to stable Aimeos release):

academe/omnipay-datatrans 3.0.5 Datatrans Gateway for the Omnipay payment processing library
aimeos/ai-admin-jqadm 2020.04.2 Aimeos Vue.js+Bootstrap admin interface
aimeos/ai-admin-jsonadm 2020.04.1 Aimeos ai-admin-jsonadm extension
aimeos/ai-client-html 2020.04.4 Aimeos ai-client-html extension
aimeos/ai-client-jsonapi 2020.04.1 Aimeos JSON API extension
aimeos/ai-controller-frontend 2020.04.1 Aimeos ai-controller-frontend extension
aimeos/ai-controller-jobs 2020.04.2 Aimeos ai-controller-jobs extension
aimeos/ai-gettext 2020.04.1 Aimeos Gettext extension
aimeos/ai-laravel 2020.04.1 Laravel adapter for Aimeos web shops and e-commerce solutions
aimeos/ai-payments 2020.04.2 Payment extension for Aimeos web shops and e-commerce solutions
aimeos/ai-swiftmailer 2020.04.1 SwiftMailer adapter for Aimeos web shops and e-commerce solutions
aimeos/aimeos-core 2020.04.3 Full-featured e-commerce components for high performance online shops
aimeos/aimeos-laravel 2020.04.1 Professional, full-featured and high performance Laravel e-commerce package for online shops and complex B2B projects
aimeos/map 1.5.0 Easy and elegant handling of PHP arrays as array-like map objects similar to jQuery and Laravel Collections
asm89/stack-cors 1.3.0 Cross-origin resource sharing library and stack middleware
brick/math 0.8.15 Arbitrary-precision arithmetic library
clue/stream-filter v1.4.1 A simple and modern approach to stream filtering in PHP
composer/installers v1.9.0 A multi-framework Composer library installer
deployer/deployer v6.8.0 Deployment Tool
deployer/phar-update v2.2.0 Integrates Phar Update to Symfony Console.
dnoegel/php-xdg-base-dir v0.1.1 implementation of xdg base directory specification for php
doctrine/cache 1.10.0 PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.
doctrine/dbal 2.10.2 Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.
doctrine/event-manager 1.1.0 The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.
doctrine/inflector 1.3.1 Common String Manipulations with regard to casing and singular/plural rules.
doctrine/instantiator 1.3.0 A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer 1.2.0 PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
dompdf/dompdf v0.8.5 DOMPDF is a CSS 2.1 compliant HTML to PDF converter
dragonmantank/cron-expression v2.3.0 CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due
egulias/email-validator 2.1.17 A library for validating emails against several RFCs
facade/flare-client-php 1.3.2 Send PHP errors to Flare
facade/ignition 2.0.2 A beautiful error page for Laravel applications.
facade/ignition-contracts 1.0.0 Solution contracts for Ignition
fideloper/proxy 4.3.0 Set trusted proxies for Laravel
filp/whoops 2.7.1 php error handling for cool kids
florianmoser/plesk-deployer v6.2.0 Deployer common recipe fixes to deploy on shared hostings using Plesk
fruitcake/laravel-cors v1.0.6 Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application
fzaninotto/faker v1.9.1 Faker is a PHP library that generates fake data for you.
guzzlehttp/guzzle 6.5.3 Guzzle is a PHP HTTP client library
guzzlehttp/promises v1.3.1 Guzzle promises library
guzzlehttp/psr7 1.6.1 PSR-7 message implementation that also provides common utility methods
hamcrest/hamcrest-php v2.0.0 This is the PHP port of Hamcrest Matchers
laminas/laminas-diactoros 1.8.7p2 PSR HTTP Message implementations
laminas/laminas-zendframework-bridge 1.0.3 Alias legacy ZF class names to Laminas Project equivalents.
laravel/framework v7.9.2 The Laravel Framework.
laravel/telescope v3.3.0 An elegant debug assistant for the Laravel framework.
laravel/tinker v2.4.0 Powerful REPL for the Laravel framework.
laravel/ui v2.0.3 Laravel UI utilities and presets.
league/commonmark 1.4.2 Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)
league/flysystem 1.0.67 Filesystem abstraction: Many filesystems, one API.
mockery/mockery 1.3.1 Mockery is a simple yet flexible PHP mock object framework
moneyphp/money v3.3.1 PHP implementation of Fowler's Money pattern
monolog/monolog 2.0.2 Sends your logs to files, sockets, inboxes, databases and various web services
moontoast/math 1.2.1 A mathematics library, providing functionality for large numbers
myclabs/deep-copy 1.9.5 Create deep copies (clones) of your objects
nesbot/carbon 2.33.0 An API extension for DateTime that supports 281 different languages.
nikic/php-parser v4.4.0 A PHP parser written in PHP
nunomaduro/collision v4.2.0 Cli error handling for console/command-line PHP applications.
nyholm/psr7 1.2.1 A fast PHP7 implementation of PSR-7
omnipay/common v3.0.3 Common components for Omnipay payment processing library
omnipay/stripe v3.1.0 Stripe driver for the Omnipay payment processing library
opis/closure 3.5.1 A library that can be used to serialize closures (anonymous functions) and arbitrary objects.
phar-io/manifest 1.0.3 Component for reading phar.io manifest information from a PHP Archive (PHAR)
phar-io/version 2.0.1 Library for handling version information and constraints
phenx/php-font-lib 0.5.2 A library to read, parse, export and make subsets of different types of font files.
phenx/php-svg-lib v0.3.3 A library to read, parse and export to PDF SVG files.
php-http/discovery 1.7.4 Finds installed HTTPlug implementations and PSR-7 message factories
php-http/guzzle6-adapter v1.1.1 Guzzle 6 HTTP Adapter
php-http/httplug v1.1.0 HTTPlug, the HTTP client abstraction for PHP
php-http/message 1.8.0 HTTP Message related tools
php-http/message-factory v1.0.2 Factory interfaces for PSR-7 HTTP Message
php-http/promise v1.0.0 Promise used for asynchronous HTTP requests
phpdocumentor/reflection-common 2.1.0 Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock 5.1.0 With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.
phpdocumentor/type-resolver 1.1.0 A PSR-5 based resolver of Class names, Types and Structural Element Names
phpoption/phpoption 1.7.3 Option Type for PHP
phpseclib/bcmath_compat 1.0.5 PHP 5.x/7.x polyfill for bcmath extension
phpseclib/phpseclib 2.0.27 PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.
phpspec/prophecy v1.10.3 Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage 7.0.10 Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator 2.0.2 FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template 1.2.1 Simple template engine.
phpunit/php-timer 2.1.2 Utility class for timing
phpunit/php-token-stream 3.1.1 Wrapper around PHP's tokenizer extension.
phpunit/phpunit 8.5.4 The PHP Unit Testing framework.
pimple/pimple v3.3.0 Pimple, a simple Dependency Injection Container
psr/container 1.0.0 Common Container Interface (PHP FIG PSR-11)
psr/event-dispatcher 1.0.0 Standard interfaces for event handling.
psr/http-factory 1.0.1 Common interfaces for PSR-7 HTTP message factories
psr/http-message 1.0.1 Common interface for HTTP messages
psr/log 1.1.3 Common interface for logging libraries
psr/simple-cache 1.0.1 Common interfaces for simple caching
psy/psysh v0.10.3 An interactive shell for modern PHP.
ralouphie/getallheaders 3.0.3 A polyfill for getallheaders.
ramsey/collection 1.0.1 A PHP 7.2+ library for representing and manipulating collections.
ramsey/uuid 4.0.1 A PHP library for generating and working with universally unique identifiers (UUIDs).
sabberworm/php-css-parser 8.3.0 Parser for CSS Files written in PHP
scrivo/highlight.php v9.18.1.1 Server side syntax highlighter that supports 185 languages. It's a PHP port of highlight.js
sebastian/code-unit-reverse-lookup 1.0.1 Looks up which function or method a line of code belongs to
sebastian/comparator 3.0.2 Provides the functionality to compare PHP values for equality
sebastian/diff 3.0.2 Diff implementation
sebastian/environment 4.2.3 Provides functionality to handle HHVM/PHP environments
sebastian/exporter 3.1.2 Provides the functionality to export PHP variables for visualization
sebastian/global-state 3.0.0 Snapshotting of global state
sebastian/object-enumerator 3.0.3 Traverses array structures and object graphs to enumerate all referenced objects
sebastian/object-reflector 1.1.1 Allows reflection of object attributes, including inherited and non-public ones
sebastian/recursion-context 3.0.0 Provides functionality to recursively process PHP variables
sebastian/resource-operations 2.0.1 Provides a list of PHP built-in functions that operate on resources
sebastian/type 1.1.3 Collection of value objects that represent the types of the PHP type system
sebastian/version 2.0.1 Library that helps with managing the version number of Git-hosted PHP projects
swiftmailer/swiftmailer v6.2.3 Swiftmailer, free feature-rich PHP mailer
symfony/console v5.0.8 Symfony Console Component
symfony/css-selector v5.0.8 Symfony CssSelector Component
symfony/error-handler v5.0.8 Symfony ErrorHandler Component
symfony/event-dispatcher v5.0.8 Symfony EventDispatcher Component
symfony/event-dispatcher-contracts v2.0.1 Generic abstractions related to dispatching event
symfony/finder v5.0.8 Symfony Finder Component
symfony/http-foundation v5.0.8 Symfony HttpFoundation Component
symfony/http-kernel v5.0.8 Symfony HttpKernel Component
symfony/mime v5.0.8 A library to manipulate MIME messages
symfony/polyfill-ctype v1.15.0 Symfony polyfill for ctype functions
symfony/polyfill-iconv v1.15.0 Symfony polyfill for the Iconv extension
symfony/polyfill-intl-idn v1.15.0 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-mbstring v1.15.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php72 v1.15.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/polyfill-php73 v1.15.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/process v5.0.8 Symfony Process Component
symfony/psr-http-message-bridge v1.3.0 PSR HTTP message bridge
symfony/routing v5.0.8 Symfony Routing Component
symfony/service-contracts v2.0.1 Generic abstractions related to writing services
symfony/translation v5.0.8 Symfony Translation Component
symfony/translation-contracts v2.0.1 Generic abstractions related to translation
symfony/var-dumper v5.0.8 Symfony mechanism for exploring and dumping PHP variables
symfony/yaml v5.0.8 Symfony Yaml Component
theseer/tokenizer 1.1.3 A small library for converting tokenized PHP source code into XML and potentially other formats
tijsverkoyen/css-to-inline-styles 2.2.2 CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.
vlucas/phpdotenv v4.1.5 Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
voku/portable-ascii 1.4.10 Portable ASCII library - performance optimized (ascii) string functions for php.
webmozart/assert 1.8.0 Assertions to validate method input/output with nice error messages.

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Payment gateways no longer working after update

Post by aimeos » 05 May 2020, 11:11

Recently, for Stripe there was an update for using the Stripe PaymentIntents API in dev-master but the 2020.04 version isn't affected by that.

Do you have more information regarding the Stripe and Datatrans errors in 2020.04?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

flomo
Posts: 52
Joined: 26 Sep 2019, 15:11

Re: Payment gateways no longer working after update

Post by flomo » 05 May 2020, 16:53

I just analyzed the payment process and it seems indeed to be a bug. This is the request, that is being sent to Datatrans:

Code: Select all

_token	"---private--"
cp_payment	"1"
merchantId[0]	"---private--"
amount[0]	"53700"
currency[0]	"CHF"
refno[0]	"104"
language[0]	"de"
reqtype[0]	"CAA"
uppReturnMaskedCC[0]	"yes"
useAlias[0]	"yes"
sign[0]	"---private---"
successUrl[0]	"---private---"
errorUrl[0]	"---private---"
cancelUrl[0]	"---private---"
The variable names seem to be an array. The same is true for Stripe:

Code: Select all

_token	"---private---"
cp_payment	"1"
paymenttoken[0] "---private---"
I noticed that a lot of methods in 2020.4 return a map/list instead of an array, like in 2019. Maybe these must just be cast to (array)?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Payment gateways no longer working after update

Post by aimeos » 05 May 2020, 17:03

Think, it's related to that fix which isn't released yet:
https://github.com/aimeos/ai-client-htm ... b29029817a

Can you try "aimeos/ai-client-html:2020.04.x-dev" and see if it works?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

flomo
Posts: 52
Joined: 26 Sep 2019, 15:11

Re: Payment gateways no longer working after update

Post by flomo » 06 May 2020, 07:17

I only replaced the code from your link in my custom extension of the checkout template for testing purposes, but yes, it solves the broken payments for Stripe and Datatrans (and probably all others). Thanks!

Any idea, when this will be in a stable release?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Payment gateways no longer working after update

Post by aimeos » 06 May 2020, 07:20

It's tagged now (2020.04.5)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

flomo
Posts: 52
Joined: 26 Sep 2019, 15:11

Re: Payment gateways no longer working after update

Post by flomo » 06 May 2020, 07:26

Perfect, thanks 8-)

Post Reply