Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yched opened this issue Jan 3, 2025 · 0 comments
Open

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

yched opened this issue Jan 3, 2025 · 0 comments

Comments

@yched
Copy link

yched commented Jan 3, 2025

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

@yched yched changed the title Transaction->errorDetail not available as a classed objetc Transaction->errorDetail not available as a classed object Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant