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

UTF-8 support #3

Merged
merged 7 commits into from
Oct 17, 2015
Merged

UTF-8 support #3

merged 7 commits into from
Oct 17, 2015

Conversation

Ymox
Copy link
Contributor

@Ymox Ymox commented Aug 17, 2015

PostFinance has two gateways depending on the charset, and the library would let connect to one of them only, which assumes ISO 8859-1. This commit should let access the gateway handling UTF-8.

Main changes are :

  • addition of a new static $CHARSET property in the environment
  • addition of the setters accordingly, with charset verification
  • refactoring of the getGatewayUrl() accordingly

This has been made quickly and in order not to cause backwards compatibility, therefore the $CHARSET – used in the static EnvironmentInterface::getGatewayUrl() method – is static as well

Added a new charset parameter in controller, stored in a new static property in the environment, and handled the endpoint URL taking this into account
Added a new charset parameter in environment, stored in a new static property, and handled the gateway URL taking this into account
The charset, as it has a default value, should not be set in the constructor, but with a setCharset method, that will be used only when needed.
xarem added a commit that referenced this pull request Oct 17, 2015
feat(charset): adding UTF-8 support
@xarem xarem merged commit 023f989 into whatwedo:develop Oct 17, 2015
@Ymox Ymox deleted the develop branch October 27, 2015 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants