amzn / amazon-pay-sdk-php

Amazon Pay PHP SDK

Home Page:https://pay.amazon.com/documentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

If response is an error, $status might not be defined on ResponseParser.php

raisen opened this issue · comments

If I receive an error response such as following:

<ErrorResponse xmlns="http://mws.amazonservices.com/schema/OffAmazonPayments/2013-01-01">
  <Error>
    <Type>Sender</Type>
    <Code>InvalidBillingAgreementId</Code>
    <Message>The BillingAgreementId C01-0006795-6194664 is invalid.</Message>
  </Error>
  <RequestId>63c96864-68ea-4d66-897a-08e8363c43f7</RequestId>
</ErrorResponse>

The getStatus() method on ResponseParser.php might not have $status defined as $path won't be found on the error response.

commented

@raisen Totally true. Is this lib even maintained? Anyone?

@raisen, good catch.

@mablae, my team maintains the Login and Pay with Amazon SDKs. We take all issues entered and pull requests submitted very seriously. I can't publicly comment on any upcoming changes or timelines, but I can say that the team is busy working on the next version at this time.

commented

@bjguillot Nice to hear! Maybe I could provide some stuff as PR. This would be for a Release 3.x I think then? Is your team publishing its work to github before it hits master?

This would be nice to join efforts with Open Source community.

Nearly 5 years later and this hasn't been fixed?