Interface ChinesePaymentService
-
- All Superinterfaces:
PaymentService
- All Known Implementing Classes:
DefaultAlipayPaymentService,DefaultWeChatPayPaymentService
public interface ChinesePaymentService extends PaymentService
The interface to be implemented by the 3rd part payment service provider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleancancelPayment(java.lang.String orderCode)Canceling the payment with the 3rd part payment service provider serverjava.lang.StringgetPaymentRequestUrl(java.lang.String orderCode)Getting the PaymentRequestUrl to be send to the 3rd part payment service provider serverjava.lang.StringgetPspLogoUrl()Getting the Logo of the 3rd part payment service providersjava.util.Optional<java.lang.String>getRefundRequestUrl(java.lang.String orderCode)Getting the RefundRequestUrl to be send to the 3rd part payment service provider serverjava.lang.StringhandleAsyncResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Handling the Asyn-response of the 3rd part payment service provider serverjava.lang.StringhandleSyncResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Handling the Sync-response of the 3rd part payment service provider serverbooleansetPaymentInfo(CartModel cartModel, ChinesePaymentInfoModel chinesePaymentInfoModel)Saving the PaymentInfovoidsyncPaymentStatus(java.lang.String orderCode)Synchronizing the PaymentStatus with the 3rd part payment service provider serverdefault voidupdatePaymentInfoForPlaceOrder(java.lang.String orderCode)Update payment info after place order-
Methods inherited from interface de.hybris.platform.payment.PaymentService
attachPaymentInfo, authorize, authorize, authorize, authorize, authorize, authorize, cancel, capture, createSubscription, createSubscription, deleteSubscription, getNewPaymentTransactionEntryCode, getPaymentTransaction, getPaymentTransactionEntry, getSubscriptionData, partialCapture, refundFollowOn, refundStandalone, refundStandalone, updateSubscription
-
-
-
-
Method Detail
-
handleAsyncResponse
java.lang.String handleAsyncResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Handling the Asyn-response of the 3rd part payment service provider server- Parameters:
request- The HttpServletRequestresponse- The HttpServletResponse- Returns:
- the code of the order
-
handleSyncResponse
java.lang.String handleSyncResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Handling the Sync-response of the 3rd part payment service provider server- Parameters:
request- The HttpServletRequestresponse- The HttpServletResponse- Returns:
- the code of the order
-
cancelPayment
boolean cancelPayment(java.lang.String orderCode)
Canceling the payment with the 3rd part payment service provider server- Parameters:
orderCode- The code of the order- Returns:
- true when canceling payment is successful
-
getPaymentRequestUrl
java.lang.String getPaymentRequestUrl(java.lang.String orderCode)
Getting the PaymentRequestUrl to be send to the 3rd part payment service provider server- Parameters:
orderCode- The code of the order- Returns:
- the payment request Url of the 3rd part payment service provider
-
syncPaymentStatus
void syncPaymentStatus(java.lang.String orderCode)
Synchronizing the PaymentStatus with the 3rd part payment service provider server- Parameters:
orderCode- The code of the order
-
setPaymentInfo
boolean setPaymentInfo(CartModel cartModel, ChinesePaymentInfoModel chinesePaymentInfoModel)
Saving the PaymentInfo- Parameters:
cartModel- The current cartchinesePaymentInfoModel- The ChinesePaymentInfo of the cart- Returns:
- true when setting PaymentInfo is successful
-
getPspLogoUrl
java.lang.String getPspLogoUrl()
Getting the Logo of the 3rd part payment service providers- Returns:
- the url of the payment service provider logo
-
getRefundRequestUrl
java.util.Optional<java.lang.String> getRefundRequestUrl(java.lang.String orderCode)
Getting the RefundRequestUrl to be send to the 3rd part payment service provider server- Parameters:
orderCode- The code of the order- Returns:
- the refund request Url of the 3rd part payment service provider if order can be refunded, otherwise return an empty Optional
-
updatePaymentInfoForPlaceOrder
default void updatePaymentInfoForPlaceOrder(java.lang.String orderCode)
Update payment info after place order- Parameters:
orderCode- The code of the order
-
-