question

globaliwebsite avatar image
globaliwebsite asked David Marginian 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");
          1. var request = new RestRequest(Method.POST);
          1. request.AddHeader("Accept", "application/json");
          1. request.AddHeader("Content-Type", "application/json");
          1. request.AddHeader("Authorization", "Bearer <authtoken>");
          1. request.AddParameter("application/json", "{\"ecomind\":\"ecom\",\"source\":\"<token>\",\"external_reference_id\":\"256\"}", ParameterType.RequestBody);
          1. IRestResponse response = client.Execute(request);
              1. {
              1. "message":"404 Not Found"
              1. "error":{
              1. "type":"invalid_request_error"
              1. "code":"invalid_request"
              1. "message":"Invalid token or token not found"
              1. }
              1. }


          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 answered David Marginian 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

          HTML Editor


          Add some details...
          Characters : 0
          Tab to the formatting toolbar with Alt/Option + F10. If inside toolbar, press ESC to return to editor. 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