Hello,
I got the below sample code from, when I ran the test order id at postman.
But I am not sure about how to implement the above code in B4A with okhttputils2.
Please advice
Thanks
I got the below sample code from, when I ran the test order id at postman.
B4X:
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"amount\": 1000000,\n \"currency\": \"INR\",\n \"receipt\": \"Receipt no. 1\",\n \"payment_capture\": 1,\n \"notes\": {\n \"notes_key_1\": \"Tea, Earl Grey, Hot\",\n \"notes_key_2\": \"Tea, Earl Grey… decaf.\"\n }\n}");
Request request = new Request.Builder()
.url("https://api.razorpay.com/v1/orders")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
.build();
Response response = client.newCall(request).execute();
But I am not sure about how to implement the above code in B4A with okhttputils2.
Please advice
Thanks