Skip to content

7.3.1

Compare
Choose a tag to compare
@bobbrodie bobbrodie released this 08 May 21:37
· 240 commits to master since this release
c9581b6

Overview

This release addresses an issue with Payout Batches, which are a deprecated feature of the API but are still used by some clients.

What's Changed

  • Bump symfony/yaml from 5.4.17 to 5.4.19
  • Addressed an issue with PayoutBatch deserialization and maintained backwards compatibility which addresses issue #238

Notes

The main change here updates the _computeAndSetAmount() function to catch a case where it can be stdClass and is related to the use of JsonMapper. For historical reasons, the 7.x version of the API includes JsonMapper in a manual fashion, and the upcoming 8.x release includes it via Composer.

    private function _computeAndSetAmount()
    {
        $amount = 0.0;
        if ($this->_instructions) {
            foreach ($this->_instructions as $instruction) {
                if ($instruction instanceof PayoutInstruction) {
                    $amount += $instruction->getAmount();
                } elseif ($instruction instanceof \stdClass) {
                    $amount += $instruction->amount;
                } else {
                    $amount += $instruction['amount'];
                }
            }
        }
        $this->_amount = $amount;
    }

Full Changelog: 7.3.0...7.3.1