Skip to content

Changed return type of getAdditionalInformation interfaces #8311

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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/code/Magento/Sales/Api/Data/OrderPaymentInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public function getAdditionalData();
/**
* Gets the additional information for the order payment.
*
* @return string[] Array of additional information.
* @return array|null|mixed Array of additional information.
Copy link
Contributor

@YevSent YevSent Jan 28, 2017

Choose a reason for hiding this comment

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

Changing annotation doesn't fix the problem in global scope. It fixes an issue for rest API but brokes payment methods output. The common issue more deeply than that annotation and related to how some payment methods use additional information, some payments contains a multi-nested array of data instead of an array of strings.

It's known issue (internal ticket MAGETWO-58379) and requires deep refactoring for some payment methods, like PayPal and Authorize.net. After that refactoring, this annotation also will be fixed.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for the deep explanation. I was expecting this kind of response. Let's wait for the new version then.

*/
public function getAdditionalInformation();

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Sales/Api/Data/TransactionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function getIsClosed();
/**
* Gets any additional information for the transaction.
*
* @return string[]|null Array of additional information. Otherwise, null.
* @return array|null|mixed Array of additional information. Otherwise, null.
*/
public function getAdditionalInformation();

Expand Down