2024-03-01 17:31:26 +08:00
|
|
|
package com.ai.da.service;
|
|
|
|
|
|
|
|
|
|
import com.paypal.http.exceptions.SerializeException;
|
|
|
|
|
import com.paypal.orders.Order;
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
public interface PayPalCheckoutService {
|
|
|
|
|
|
2024-03-06 20:56:22 +08:00
|
|
|
HashMap<String, String> createOrder(Integer amount,String returnUrl) throws SerializeException;
|
2024-03-01 17:31:26 +08:00
|
|
|
/**
|
|
|
|
|
* 回调
|
|
|
|
|
* @param map
|
|
|
|
|
*/
|
|
|
|
|
String callback(@SuppressWarnings("rawtypes") Map map);
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|