Skip to content

Transaction->errorDetail not available as a classed object #64

Description

@yched

Description of the Bug

Result::transaction() maps the 'gateway_error_detail' API field to the Models\TransactionGatewayErrorDetail class

But the 'gateway_error_detail' API field does not exist, it's 'error_detail' in the actuel JSON data for a transaction :
https://apidocs.eu.chargebee.com/docs/api/transactions?lang=curl#transaction_error_detail

Steps to reproduce

$t = \ChargeBee\ChargeBee\Models\Transaction::retrieve('some_failed_transaction')->transaction();
$t->errorDetail === [
  "error_category" => "invalid_request_error",
  "error_message" => "This PaymentIntent requires a mandate, but (...)",
  "object" => "gateway_error_detail",
]

Expected Behavior

$t->errorDetail should be an instance of Models\TransactionGatewayErrorDetail

Operating System

Linux

Language version

Php 8.1.30

Library version

v3.38.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions