question

globaliwebsite avatar image
globaliwebsite asked David Marginian Deactivated commented

Pay to order end point not working

This is the complete posting i am doing and it return errors Please guide me to fix this

                 
    1. var client = new RestClient("https://scl-sandbox.dev.clover.com/v1/orders/1P7VFVYXAHKFG/pay");
    2. var request = new RestRequest(Method.POST);
    3. request.AddHeader("Accept", "application/json");
    4. request.AddHeader("Content-Type", "application/json");
    5. request.AddHeader("Authorization", "Bearer <authtoken>");
    6. request.AddParameter("application/json", "{\"ecomind\":\"ecom\",\"source\":\"<token>\",\"external_reference_id\":\"256\"}", ParameterType.RequestBody);
    7. IRestResponse response = client.Execute(request);
                 
    1. {
    2. "message":"404 Not Found"
    3. "error":{
    4. "type":"invalid_request_error"
    5. "code":"invalid_request"
    6. "message":"Invalid token or token not found"
    7. }
    8. }


Please advice me what is getting wrong so i can fix it and complete the integration.

Orders
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

Is there a reason why you are creating another post for this? I responded to you at your original post - https://community.clover.com/questions/26467/pay-for-order-error-on-sandbox.html. The message says the token is not valid. How exactly are you creating the token?

6 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

globaliwebsite avatar image globaliwebsite commented ·

No i do not have PCI DSS certification are you referring me to use this iframe integration

Please confirm

https://docs.clover.com/docs/using-the-clover-hosted-iframe

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ globaliwebsite commented ·

That is correct.

0 Likes 0 ·
globaliwebsite avatar image globaliwebsite David Marginian ♦♦ commented ·

But why its token is not valid, on pay to order end point only. I generated token and use on Create Charge end point and the same token works but the same way generated token not works on pay to order end point.


I am not getting the reason of it? If PCI is the problem so token should not generate and if token is generated successfully and its working create charge end point so it should work on pay to order end point also.


I am really not understand your reason of PCI

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community