Fix A.net to resolve time when using default #14540
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Fixes failure to resolve date in authorize.net - this is likely a test-only bug.
Before
In the unit test when it is run in isolation there is no receive_date in $_REQUEST so it uses the default of 'now' however this is not correctly handled
After
Default is formatted to a date string
Technical Details
This has been passing in our test suite -but in fact it seems that it only passes because some other test is contaminating the $_REQUES
Comments
This is presumably passed through to the contribution api & hence it is not so grumpy but when
passed to the activity create fn it is failing when the test is run in isolation (& maybe other scenarios?)
due to 'now' not being parsed correctly.
Presumably it is not left blank in production scenarios as this would have triggered bug reports since it is a clear bug