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

Prevent cookie props from overwriting existing query params. #71

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

benfterpay
Copy link
Contributor

@benfterpay benfterpay commented Jan 19, 2024

Follows #70 for EIT-3646.

Accepts @abbadata's suggestion to prevent the token param from being overwritten by the cookie.

Tested with this cookie on localhost:

{"deviceId":"23f15075-817f-48d0-be3e-8f865ccf9ffc","userId":"","eventId":38,"lastEventTime":1701830793034,"checkout":{"token":"another-token","abc":"def"}}

Result (excerpt) from /sample/HTTPRequestCreateCheckoutWithValidation.php:

{
    "token": "001.agkokl6f6t7cpic9ccs89mad6r64u58330vi6v09884is94m",
    "expires": "2024-01-19T04:47:59.056Z",
    "redirectCheckoutUrl": "https://portal.sandbox.afterpay.com/au/checkout/?token=001.agkokl6f6t7cpic9ccs89mad6r64u58330vi6v09884is94m&device_id=23f15075-817f-48d0-be3e-8f865ccf9ffc&abc=def"
}

@benfterpay benfterpay merged commit de8d969 into main Jan 19, 2024
19 of 34 checks passed
@benfterpay benfterpay deleted the feature/more-dm-data-to-checkout-EIT-3646 branch January 19, 2024 06:26
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