Files
aida_back/src/main/java/com/ai/da/service/PayPalCheckoutService.java

36 lines
963 B
Java
Raw Normal View History

package com.ai.da.service;
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;
import java.util.Map;
public interface PayPalCheckoutService {
HashMap<String, String> createOrder(Integer amount,String returnUrl) throws SerializeException;
/**
* 回调
* @param map
*/
String callback(@SuppressWarnings("rawtypes") Map map);
Boolean doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException;
String 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);
}