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

uppAliasOnly is deprecated; use useAlias #5

Closed
judgej opened this issue Aug 22, 2018 · 2 comments
Closed

uppAliasOnly is deprecated; use useAlias #5

judgej opened this issue Aug 22, 2018 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@judgej
Copy link
Member

judgej commented Aug 22, 2018

It's used in a few places, so needs to be handled differently.

     * @var string value to request a card alias only (uppAliasOnly data item)
./src/Interfaces/Constants.php
        $data[] = $this->getAmountInteger() ?: 'uppAliasOnly';
./src/Message/AbstractRequest.php
            $data['uppAliasOnly'] = Gateway::CARD_ALIAS_ONLY;
./src/Message/AbstractRedirectRequest.php

The new useAlias is also used, so it may well be covered, but we need to be sure:

                $data['useAlias'] = Gateway::USE_ALIAS;
./src/Message/AbstractRedirectRequest.php
            'useAlias'   => 'yes'
./src/Message/TokenizeRequest.php
            'useAlias' => 'yes',
            'useAlias' => 'yes',
./tests/Message/TokenizeRequestTest.php
@judgej judgej added the enhancement New feature or request label Aug 22, 2018
@judgej judgej self-assigned this Aug 22, 2018
@judgej judgej changed the title uppAliasOnly is deprecated uppAliasOnly is deprecated; use useAlias Aug 22, 2018
judgej added a commit that referenced this issue Aug 29, 2018
judgej added a commit that referenced this issue Aug 29, 2018
@judgej
Copy link
Member Author

judgej commented Aug 29, 2018

Now a zero amount is treated like any other amount in the UPP hash, rather than being replaced by the uppAliasOnly literal string.

If the amount is zero, then the useAlias flag is automatically set with the assumption that a card alias is being requested. This should work with other payment type aliases too, such as the PayPal orderId.

We set useAlias to yes, as that appears most often in documentation. In some places it is specified as true, and other places 1. They all seem to work. For now.

@judgej
Copy link
Member Author

judgej commented Sep 4, 2018

Released as version 3.0.4

Not back-ported to 2.x. This can be done if there is a demand.

@judgej judgej closed this as completed Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant