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 cancel or refund a pre-authorized order #64

Closed
andidev opened this issue Sep 4, 2018 · 3 comments
Closed

How to cancel or refund a pre-authorized order #64

andidev opened this issue Sep 4, 2018 · 3 comments

Comments

@andidev
Copy link
Contributor

andidev commented Sep 4, 2018

How do I cancel a pre-authorized order? I can't call refund since I get the following error then:

{ http_code: 428,
  details:
   [ { debug_message: 'The order can not be returned.',
       message: 'The order can not be returned.',
       code:
        'conekta.errors.precondition_required.combo.order.is_not_returnable' } ],
  object: 'error',
  type: 'precondition_required_error',
  log_id: '5b8f0319b795b001b889066f' }

Calling refundOrder after capturing it probably works but it feels like the wrong way to do it.

@andidev
Copy link
Contributor Author

andidev commented Sep 5, 2018

Apparently this is done by sending a void POST request

curl -H "Accept: application/vnd.conekta-v2.0.0+json" \
 -H "Content-type: application/json" \
 -u key_y1ALCcyFVgGAghsjsjdSJ: \
 -X POST https://api.conekta.io/orders/ord_2iuxtxTJo3mNubxmV/void

though it does not seem to be supportet with this library.

@KarlaRobinson
Copy link
Contributor

I am going to close this issue as we have merged your pr and the Node library now contains the void method.

@kalin89
Copy link

kalin89 commented Oct 16, 2019

Aparentemente esto se hace enviando una solicitud POST nula

curl -H "Accept: application/vnd.conekta-v2.0.0+json" \
 -H "Content-type: application/json" \
 -u key_y1ALCcyFVgGAghsjsjdSJ: \
 -X POST https://api.conekta.io/orders/ord_2iuxtxTJo3mNubxmV/void

aunque no parece ser compatible con esta biblioteca.

I have the same problem with .Net, support tells me that I should send that post request, I understand that -H is "Header" but what does "-U" mean? Thanks for the help. I would be grateful if you could attach an image of how to make this request, either by code or a program such as postman, for example, thanks.

I want to emphasize that I have put the private key in the Url and it sends me a version incoatibility error.

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

3 participants