|
@@ -10,6 +10,7 @@ import com.fdkankan.pay.response.OpenPayResponse;
|
|
import com.fdkankan.pay.service.IStripePriceService;
|
|
import com.fdkankan.pay.service.IStripePriceService;
|
|
import com.fdkankan.pay.service.IStripeProductService;
|
|
import com.fdkankan.pay.service.IStripeProductService;
|
|
import com.fdkankan.pay.util.CacheUtil;
|
|
import com.fdkankan.pay.util.CacheUtil;
|
|
|
|
+import com.paypal.api.payments.Payment;
|
|
import com.stripe.model.Price;
|
|
import com.stripe.model.Price;
|
|
import com.stripe.model.Product;
|
|
import com.stripe.model.Product;
|
|
import com.stripe.model.checkout.Session;
|
|
import com.stripe.model.checkout.Session;
|
|
@@ -103,6 +104,25 @@ public class StripeService {
|
|
|
|
|
|
public Boolean callBack(HttpServletRequest request, HttpServletResponse response, Order order, String result) {
|
|
public Boolean callBack(HttpServletRequest request, HttpServletResponse response, Order order, String result) {
|
|
log.info("stripe-callback:{},{}",order,request);
|
|
log.info("stripe-callback:{},{}",order,request);
|
|
- return false;
|
|
|
|
|
|
+ Boolean payFlag = false;
|
|
|
|
+ String trade_no = null;
|
|
|
|
+ String openId = null;
|
|
|
|
+ if("cancel".equals(result)){
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ Map<String, String[]> parameterMap = request.getParameterMap();
|
|
|
|
+ for (String key : parameterMap.keySet()) {
|
|
|
|
+ log.info("stripe-callBack--request:{},{}",key,request.getParameter(key));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }catch (Exception e) {
|
|
|
|
+ log.error("paypal支付回调异常,errorMsg:{}", e.getMessage());
|
|
|
|
+ return false;
|
|
|
|
+ }finally {
|
|
|
|
+ //orderService.payResult(order,payFlag,trade_no,openId);
|
|
|
|
+ }
|
|
|
|
+ return true;
|
|
}
|
|
}
|
|
}
|
|
}
|