Closed DF-Dave closed 3 months ago
Sorry for the premature merge. I messed this up. The feature is good and I will work towards merging it. Thank you! A few questions in code comments.
Sorry for the premature merge. I messed this up. The feature is good and I will work towards merging it. Thank you! A few questions in code comments.
It's ok, it can happen to anyone 🙂
Thanks for your feedback. I will implement it and then open another pull request.
Hi,
I'm currently working to retry an
AuthorizeRequest
after the first response indicates that the customer cannot approve at this time and returns a behavior ofRETRY_LATER
. I searched a little bit in the Saferpay documentation and in this article I found the information https://docs.saferpay.com/home/integration-guide/licences-and-interfaces/error-handling#the-requestid-and-retryindicatorYou can signal the retry by setting the
requestId
with the identical value of the first try and increase theretryIndicator
in therequestHeader
. This sounds straight forward but unfortunately therequestHeader
cannot be modified in the current release because the getter in theRequest.php
always returns a new instance and only set thecustomerId
and so with every call the requestIndicator is zero and therequestId
is a new uuid.I modified your
RequestConfig.php
to support therequestId
andretryIndicator
because in your current design every modification to the request is set via the config. Thats the reason why I did not implement it in theRequest.php
directly. But I'm pleased to recieve your feedback.