PHP Full SDK v7.3.1

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

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;
    }