2024-03-01 17:31:26 +08:00
|
|
|
package com.ai.da.service;
|
|
|
|
|
|
2025-01-07 14:31:43 +08:00
|
|
|
import com.ai.da.model.dto.ProductPurchaseDTO;
|
2024-03-01 17:31:26 +08:00
|
|
|
import com.paypal.http.exceptions.SerializeException;
|
|
|
|
|
import com.paypal.orders.Order;
|
|
|
|
|
|
2024-03-15 15:38:56 +08:00
|
|
|
import javax.servlet.ServletException;
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
2024-03-01 17:31:26 +08:00
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
|
|
|
|
public interface PayPalCheckoutService {
|
|
|
|
|
|
2025-01-07 14:31:43 +08:00
|
|
|
HashMap<String, String> createOrder(ProductPurchaseDTO productPurchaseDTO, HttpServletRequest request) throws SerializeException;
|
2024-03-26 15:31:57 +08:00
|
|
|
|
|
|
|
|
// String callback(@SuppressWarnings("rawtypes") Map map);
|
2024-03-01 17:31:26 +08:00
|
|
|
|
2024-03-15 15:38:56 +08:00
|
|
|
Boolean doPost(HttpServletRequest req, HttpServletResponse resp)
|
|
|
|
|
throws ServletException, IOException;
|
|
|
|
|
|
2024-07-15 13:42:18 +08:00
|
|
|
String getBody(HttpServletRequest request) throws IOException;
|
|
|
|
|
|
2024-04-10 16:07:52 +08:00
|
|
|
Order queryOrder(String orderNo) throws SerializeException;
|
2024-03-01 17:31:26 +08:00
|
|
|
|
|
|
|
|
Order captureOrder(String orderId) throws IOException;
|
|
|
|
|
|
|
|
|
|
Boolean refundOrder(String orderId, String reason) throws IOException;
|
|
|
|
|
|
|
|
|
|
String getOAuth();
|
|
|
|
|
|
|
|
|
|
void processOrder(String orderId);
|
2024-04-10 16:07:52 +08:00
|
|
|
|
|
|
|
|
void checkOrderStatus(String orderNo) throws SerializeException;
|
2024-03-01 17:31:26 +08:00
|
|
|
}
|
|
|
|
|
|