www in docker support
This commit is contained in:
parent
539a848e95
commit
c227fce036
2145 changed files with 399596 additions and 58 deletions
|
|
@ -0,0 +1,24 @@
|
|||
package com.paypal;
|
||||
|
||||
import com.paypal.AuthorizeIntentExamples.CreateOrder;
|
||||
import com.paypal.http.HttpRequest;
|
||||
import com.paypal.http.HttpResponse;
|
||||
import com.paypal.http.serializer.Json;
|
||||
import com.paypal.orders.Order;
|
||||
import com.paypal.orders.OrdersGetRequest;
|
||||
import java.io.IOException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class GetOrder extends PayPalClient {
|
||||
public void getOrder(String orderId) throws IOException {
|
||||
OrdersGetRequest request = new OrdersGetRequest(orderId);
|
||||
HttpResponse<Order> response = client().execute((HttpRequest)request);
|
||||
System.out.println("Full response body:");
|
||||
System.out.println(new JSONObject(new Json().serialize(response.result())).toString(4));
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
HttpResponse<Order> response = new CreateOrder().createOrder(false);
|
||||
new GetOrder().getOrder(((Order)response.result()).id());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue