Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP warning Invalid argument supplied for foreach() when enriching payment methods #7

Closed
rvdsteege opened this issue Sep 29, 2022 · 4 comments · Fixed by #8
Closed
Assignees

Comments

@rvdsteege
Copy link
Member

A customer noticed the following error after updating a Buckaroo configuration:

Warning: Invalid argument supplied for foreach() in /wp-content/plugins/pronamic-ideal2/vendor/wp-pay-gateways/buckaroo/src/Gateway.php on line 141

Internal Help Scout ticket: https://secure.helpscout.net/conversation/2023552014/24521

@remcotolsma
Copy link
Member

I did not encounter this during testing, were we able to reproduce this problem?

@remcotolsma remcotolsma moved this to In Progress in Pronamic Pay Sep 29, 2022
@rvdsteege
Copy link
Member Author

I'm unable to reproduce the warning. The only things I could think of was a temporary issue at Buckaroo or no services enabled for the Buckaroo account.

With invalid Buckaroo credentials the result is a fatal error (in Gravity Forms payment feed), not the mentioned warning:

Fatal error: Uncaught Exception: application access is denied, Authorization header value is invalid in /wp-content/plugins/pronamic-ideal/repositories/pronamic/wp-pronamic-pay-buckaroo/src/Gateway.php on line 728

@rvdsteege rvdsteege assigned remcotolsma and unassigned remcotolsma Sep 29, 2022
@rvdsteege
Copy link
Member Author

I've received Buckaroo account details from the customer and was able to reproduce the warning in live mode. In the response to the request to Transaction/Specifications the Services property is null. My initial property_exists() is therefore definitely not the proper solution — as the property exists, but just doesn't contain any services.

I have contacted Buckaroo support for clarification on why there are no services in the live mode response:

Kunnen jullie ophelderen waarom er in de live modus geen resultaat is? Heeft dat met de account te maken of kunnen de actieve services nooit op deze manier in de live modus opgevraagd worden?

@rvdsteege
Copy link
Member Author

Response from Buckaroo:

Op live zal de call enkel de betaalmethoden teruggeven die actief staan binnen het account. Momenteel staan enkel iDeal en Transfer inactief opgevoerd (dus wel beschikbaar voor test). Vandaar dat dezelfde call naar de live checkout een leeg resultaat geeft voor deze klant.

Repository owner moved this from In Progress to Done in Pronamic Pay Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants