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

PW-1188: Add applicationInfo into terminal API requests #141

Merged
merged 10 commits into from
Dec 23, 2019
Merged

Conversation

Aleffio
Copy link
Member

@Aleffio Aleffio commented Dec 19, 2019

Description
Add applicationInfo for terminal API requests inside SaleToAcquirerData.
If SaleToAcquirerData is empty, just add ApplicationInfo and base64encode it.
If SaleToAcquirerData contains data, add ApplicationInfo to it.

Tested scenarios

  1. SaleToAcquirerData empty -> SaleToAcquirerData contains ApplicationInfo in base64
  2. SaleToAcquirerData contains recurring details in querystring form -> SaleToAcquirerData contains recurring details and ApplicationInfo in Base64
  3. SaleToAcquirerData contains recurring details in Base64 -> SaleToAcquirerData contains recurring details and ApplicationInfo in Base64

Fixed issue:

@Aleffio Aleffio changed the title [WIP] PW-1188: Add applicationInfo into terminal API requests PW-1188: Add applicationInfo into terminal API requests Dec 20, 2019
src/Adyen/Config.php Outdated Show resolved Hide resolved
src/Adyen/Service/AbstractResource.php Outdated Show resolved Hide resolved
src/Adyen/Service/AbstractResource.php Outdated Show resolved Hide resolved
src/Adyen/Service/AbstractResource.php Outdated Show resolved Hide resolved
src/Adyen/Service/AbstractResource.php Outdated Show resolved Hide resolved
*/
public function getMerchantApplication()
{
return isset($this->data['merchantApplication']) ? $this->data['merchantApplication'] : null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's slowly migrate off of the data field and use proper string value for this. protected $merchantApplication;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore it as this will mean for every param we added it will be a major release for our merchants what is not ideal

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can deprecate the interface so we are more flexible in the future.

@@ -22,6 +36,6 @@ public function __construct($service, $asynchronous)
} else {
$this->endpoint = $service->getClient()->getConfig()->get('endpointTerminalCloud') . '/sync';
}
parent::__construct($service, $this->endpoint);
parent::__construct($service, $this->endpoint, $allowApplicationInfo = false, $this->allowApplicationInfoPOS);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$allowApplicationInfo = false change this to $allowApplicationInfo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
parent::__construct($service, $this->endpoint, $allowApplicationInfo = false, $this->allowApplicationInfoPOS);
parent::__construct($service, $this->endpoint, $this->allowApplicationInfo, $this->allowApplicationInfoPOS);

… interface as deprecated so we can remove it in future releases to cleanup the config object.
@rikterbeek rikterbeek merged commit 410792b into develop Dec 23, 2019
@AlexandrosMor AlexandrosMor deleted the PW-1188 branch March 24, 2022 13:56
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.

4 participants