Closed itoshige closed 6 years ago
Thanks for finding this bug and submitting a pull request with a proposed fix.
In reviewing this, the thought occurred to fix this using a different approach. Rather than setting the bool to true in the object, we are considering defining it as a "bool?" type instead of "bool" so that it can take on null values. Then, in the part of the code that sends the POST, if the value was null, we would not actually send the inherit shipping address attribute at all, so that the API would decide how to handle defaulted values, without the SDK trying to override the API's behavior.
There are other attributes that would need the same treatment such as capture now and confirm now in other parts of the code. We had made a fix similar to this in our PHP SDK previously and had intended to do something similar with the C# SDK.
Thank you for your comment. I think it’s the best way to fix these issues. I hope this approach will be released.
But.. I have some problems.. beacause some users using this SDK need to fix this bug quickly. So Could I provide this package that I fixed to some users?(I think to provide as a local package). After you will release new specifications, I will announce a new SDK to some users.
In the meantime, users of the SDK can call WithInheritShippingAddress(true) method on the AuthorizeOnBillingAgreementRequest object. To fix the underlying issue, we will add this to the list of items to be addressed in our next SDK release.
Thank you for your contribution.
Thank you for your merging! Many merchants can launch for your help.
bug fix
AuthorizeOnBillingAgreement https://pay.amazon.com/us/developer/documentation/apireference/201751940 InheritShippingAddress default is true. but sdk is false. and unittest isn't also good. So I fixed sdk and unittest.