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

        jonathan Jonathan Reissmueller created issue -
        jonathan Jonathan Reissmueller made changes -
        Field Original Value New Value
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Issue Type Task [ 3 ] Improvement [ 4 ]
        jonathan Jonathan Reissmueller made changes -
        Story Points 2
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.3.0 Sprint 2 [ 139 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked lower
        abdy Abdy Franco made changes -
        Assignee Abdy Franco [ abdy ]
        abdy Abdy Franco made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        abdy Abdy Franco made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 14 minutes [ 840 ]
        Worklog Id 15331 [ 15331 ]
        abdy Abdy Franco made changes -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        jonathan Jonathan Reissmueller made changes -
        Status In Review [ 5 ] Closed [ 6 ]

          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