37 lines
1.1 KiB
Java
37 lines
1.1 KiB
Java
package com.ai.da.service;
|
|
|
|
import com.ai.da.model.dto.ProductPurchaseDTO;
|
|
import com.paypal.http.exceptions.SerializeException;
|
|
import com.paypal.orders.Order;
|
|
|
|
import javax.servlet.ServletException;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import java.io.IOException;
|
|
import java.util.HashMap;
|
|
|
|
public interface PayPalCheckoutService {
|
|
|
|
HashMap<String, String> createOrder(ProductPurchaseDTO productPurchaseDTO, HttpServletRequest request) throws SerializeException;
|
|
|
|
// String callback(@SuppressWarnings("rawtypes") Map map);
|
|
|
|
Boolean doPost(HttpServletRequest req, HttpServletResponse resp)
|
|
throws ServletException, IOException;
|
|
|
|
String getBody(HttpServletRequest request) throws IOException;
|
|
|
|
Order queryOrder(String orderNo) throws SerializeException;
|
|
|
|
Order captureOrder(String orderId) throws IOException;
|
|
|
|
Boolean refundOrder(String orderId, String reason) throws IOException;
|
|
|
|
String getOAuth();
|
|
|
|
void processOrder(String orderId);
|
|
|
|
void checkOrderStatus(String orderNo) throws SerializeException;
|
|
}
|
|
|