Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-4509

Bitpay: Token validation may fail for valid token

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2.0
    • Component/s: None
    • Labels:
      None

      Description

      One client encountered an error when validating an approved token, since the api request to fetch ledgers resulted in an error like the following:

      [2021-10-04T19:43:39.998692+00:00] general.ERROR: BITPAY-LEDGER-GET: Failed to retrieve ledger-> failed to serialize Ledger object : GET failed : Guzzle\/BadResponseException : Server error: `GET https://bitpay.com/ledgers?token=6YZajLf5hJ2yMd7ttyer6r6qY3tM3a1KmJysmknSdKcMg resulted in a 500 Internal Server Error` response: {"error":"No ledgers for account"}

      This happened even though there were ledgers assigned to the user. The subscription api call seems to be more reliable.

      Change:

                                      $ledgers = $bitpay->getLedgers();
      

      To

                                      $subscriptions = $bitpay->getSubscriptions();
      

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            jonathan Jonathan Reissmueller
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              18/Oct/21

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 14 minutes
              14m

                Agile