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

Add the possibility to add custom field name as string #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JulienRAVIA
Copy link

@JulienRAVIA JulienRAVIA commented Nov 14, 2023

I'm doing this PR because i've noticed that when i want to add a custom field, if there is only entry in the $name (expecting array) parameter, the custom_field won't have his name reported in Payrexx or the webhooks :

Problem :

Does not work :

$gateway->addField($type = 'custom_field_2', $value = '123456789', $name = [
	'Identifier'
]);

image
image

I guess it expect to have an array with an index with country codes, but in my case i don't care if the custom field is translated, and i don't want to have to translate it in any language :)

Solution :

But when i do this, it does work :

$gateway->addField($type = 'custom_field_2', $value = '123456789', $name = 'Identifier');

image
image

But when i do this, my PHPStan doesn't like this at all :
image

This PR so resolve it 🙏

As you see, it's not a big deal ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant