Skip to content

Refund Issue - Sandbox vs Production Environment #3

@danielb93

Description

@danielb93

I'm finding a discrepancy between the JSON response from the Refund endpoint in the sandbox environment compared to the production environment. This difference (additional keys in the 'Refund' object) is causing an error when the SDK attempts to instantiate the AbstractResponse class:

Eway\Rapid\Model\Response\RefundResponse

I've tracked the down the line causing the error:

/eway/eway-rapid-php/src/Rapid/Client.php:565

/** @var AbstractResponse $response */
$response = new $class($data);

In the production environment this line produces an S9995 error, as show below:

Eway\Rapid\Model\Response\RefundResponse Object
(
    [fillable:protected] => Array
        (
            [0] => AuthorisationCode
            [1] => Customer
            [2] => Errors
            [3] => Refund
            [4] => ResponseCode
            [5] => ResponseMessage
            [6] => TransactionID
            [7] => TransactionStatus
            [8] => Verification
        )

    [errors:protected] => Array
        (
        )

    [attributes:protected] => Array
        (
            [Errors] => S9995
        )

)

However this works flawlessly while in the sandbox environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions