wirecardBrasil / moip-sdk-php

Cliente em PHP para integração server-side com APIs Moip v2
MIT License
124 stars 90 forks source link

hotfix: Fixed return error in path in payment record #306

Open WalderlanSena opened 5 years ago

WalderlanSena commented 5 years ago

When a new payment is made after it has already been added previously, the api was not returning a path in the stdclass assembly. I added a validation in the Error.php class to validate its existence. It could only be added the ternary operator of php 7, however to maintain compatibility with previous versions of the language, we needed to add the if.

There was 1 error:

1) App\Bundles\WirecardBundle\Tests\WirecardNewPaymentControllerTest::testCreateNewPayment
Undefined property: stdClass::$path