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

How to get the detail processor response from the Mutation ? #37

Open
dcheng857 opened this issue Jul 4, 2023 · 2 comments
Open

How to get the detail processor response from the Mutation ? #37

dcheng857 opened this issue Jul 4, 2023 · 2 comments

Comments

@dcheng857
Copy link

Hi here, I'm trying to simulate some error response by the transaction amount which mentions in the Braintree document:
https://developer.paypal.com/braintree/docs/reference/general/testing/node#transaction-amounts

When I view the response of the authorizeCreditCard mutation, it only contain a simple status status: "PROCESSOR_DECLINED. Even the statusHistory field is also return the same status:
image

May I know is it possible to get the detail processor response from the api?

Many thanks!

@dcheng857 dcheng857 changed the title How to get the detail processor response from the Mutation How to get the detail processor response from the Mutation ? Jul 4, 2023
@wysmith-publicgit
Copy link
Contributor

Hi @dcheng857
Yes, it is possible to get the details of the processor response from the API. The statusHistory field contains a list of PaymentStatusEvents. These events can be of multiple implementations including as a ProcessorDeclinedEvent. This event contains the field processorResponse which will contain all of the details the processor returns. This can be implemented by adding the following under the statusHistory.

... on ProcessorDeclinedEvent {
   processorResponse {
      <desired fields>
   }

This can then be done for the other types of PaymentStatusEvents as well.

@dcheng857
Copy link
Author

Hi @dcheng857 Yes, it is possible to get the details of the processor response from the API. The statusHistory field contains a list of PaymentStatusEvents. These events can be of multiple implementations including as a ProcessorDeclinedEvent. This event contains the field processorResponse which will contain all of the details the processor returns. This can be implemented by adding the following under the statusHistory.

... on ProcessorDeclinedEvent {
   processorResponse {
      <desired fields>
   }

This can then be done for the other types of PaymentStatusEvents as well.

Thanks @wysmith-publicgit, you just made my day !

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

2 participants