Skip to content

adds new field to the getTokenResponse#102

Merged
kotivuori merged 3 commits intomasterfrom
network-token
Jun 13, 2025
Merged

adds new field to the getTokenResponse#102
kotivuori merged 3 commits intomasterfrom
network-token

Conversation

@paytrail-max
Copy link
Copy Markdown
Contributor

Description

adds new field to the getTokenResponse

@paytrail-max paytrail-max force-pushed the network-token branch 3 times, most recently from 4c8bebb to 9e3f675 Compare May 16, 2025 12:28
@paytrail-max
Copy link
Copy Markdown
Contributor Author

Version bump?

Comment thread src/Model/Token/NetworkToken.php Outdated
$this->setExpireYear($networkToken->expire_year);
$this->setExpireMonth($networkToken->expire_month);
$this->setImageUrl($networkToken->image_url);
$this->setPaymentAccountReference($networkToken->payment_account_reference);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This can raise a warning: PHP Warning: Undefined property: stdClass::$payment_account_reference

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added ?? null to payment account reference 👍

Comment thread src/Response/GetTokenResponse.php Outdated
Comment on lines +138 to +142
if (isset($response->networkToken)) {
$networkToken = new NetworkToken();
$networkToken->loadFromStdClass($response->networkToken);
$this->setNetworkToken($networkToken);
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Paytrail response has network_token so updating this to $response->network_token fixes it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

network_token is optionally returned from the api so isset ok?

@kotivuori kotivuori merged commit 4bfc75c into master Jun 13, 2025
14 checks passed
@kotivuori kotivuori deleted the network-token branch June 13, 2025 14:05
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