Class DefaultWeChatPayPaymentService
java.lang.Object
de.hybris.platform.payment.impl.DefaultPaymentServiceImpl
de.hybris.platform.chinesepspwechatpayservices.payment.impl.DefaultWeChatPayPaymentService
- All Implemented Interfaces:
ChinesePaymentService,PaymentService
public class DefaultWeChatPayPaymentService
extends DefaultPaymentServiceImpl
implements ChinesePaymentService
A default implements of chinese payment service
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancancelPayment(String orderCode) Canceling the payment with the 3rd part payment service provider servervoidcreateTransactionForNewRequest(String orderCode) class for Chinesepspwechatpayservices payment impl.protected ChineseOrderServiceprotected ModelServicegetPaymentRequestUrl(String orderCode) Getting the PaymentRequestUrl to be send to the 3rd part payment service provider serverGetting the Logo of the 3rd part payment service providersgetRefundRequestUrl(String orderCode) Getting the RefundRequestUrl to be send to the 3rd part payment service provider serverprotected WeChatPayConfigurationprotected WeChatPayHttpClienthandleAsyncResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Handling the Asyn-response of the 3rd part payment service provider serverhandleSyncResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Handling the Sync-response of the 3rd part payment service provider servervoidsetChineseOrderService(ChineseOrderService chineseOrderService) voidsetCommerceCheckoutService(CommerceCheckoutService commerceCheckoutService) voidsetConfigurationService(ConfigurationService configurationService) voidsetMediaService(MediaService mediaService) voidsetModelService(ModelService modelService) voidsetOrderDao(WeChatPayOrderDao orderDao) booleansetPaymentInfo(CartModel cartModel, ChinesePaymentInfoModel chinesePaymentInfoModel) Saving the PaymentInfovoidsetWeChatPayConfiguration(WeChatPayConfiguration weChatPayConfiguration) voidsetWeChatPayHttpClient(WeChatPayHttpClient weChatPayHttpClient) voidsetWeChatPayPaymentInfoStrategy(WeChatPayPaymentInfoStrategy weChatPayPaymentInfoStrategy) voidsetWeChatPayPaymentTransactionStrategy(WeChatPayPaymentTransactionStrategy weChatPayPaymentTransactionStrategy) voidsyncPaymentStatus(String orderCode) Synchronizing the PaymentStatus with the 3rd part payment service provider servervoidupdatePaymentInfoForPlaceOrder(String orderCode) Update payment info after place orderMethods inherited from class de.hybris.platform.payment.impl.DefaultPaymentServiceImpl
attachPaymentInfo, authorize, authorize, authorize, authorize, authorize, authorize, authorizeInternal, cancel, capture, createBillingInfo, createBillingInfo, createSubscription, createSubscription, deleteSubscription, getCardPaymentService, getCommonI18NService, getFlexibleSearchService, getNewPaymentTransactionEntryCode, getPaymentInfoCreator, getPaymentTransaction, getPaymentTransactionEntry, getSubscriptionData, getTransactionCodeGenerator, partialCapture, refundFollowOn, refundStandalone, refundStandalone, setCardPaymentService, setCommonI18NService, setFlexibleSearchService, setPaymentInfoCreator, setTransactionCodeGenerator, updateSubscriptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
-
Constructor Details
-
DefaultWeChatPayPaymentService
public DefaultWeChatPayPaymentService()
-
-
Method Details
-
handleAsyncResponse
public String handleAsyncResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Description copied from interface:ChinesePaymentServiceHandling the Asyn-response of the 3rd part payment service provider server- Specified by:
handleAsyncResponsein interfaceChinesePaymentService- Parameters:
request- The HttpServletRequestresponse- The HttpServletResponse- Returns:
- the code of the order
-
handleSyncResponse
public String handleSyncResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Description copied from interface:ChinesePaymentServiceHandling the Sync-response of the 3rd part payment service provider server- Specified by:
handleSyncResponsein interfaceChinesePaymentService- Parameters:
request- The HttpServletRequestresponse- The HttpServletResponse- Returns:
- the code of the order
-
cancelPayment
Description copied from interface:ChinesePaymentServiceCanceling the payment with the 3rd part payment service provider server- Specified by:
cancelPaymentin interfaceChinesePaymentService- Parameters:
orderCode- The code of the order- Returns:
- true when canceling payment is successful
-
getPaymentRequestUrl
Description copied from interface:ChinesePaymentServiceGetting the PaymentRequestUrl to be send to the 3rd part payment service provider server- Specified by:
getPaymentRequestUrlin interfaceChinesePaymentService- Parameters:
orderCode- The code of the order- Returns:
- the payment request Url of the 3rd part payment service provider
-
syncPaymentStatus
Description copied from interface:ChinesePaymentServiceSynchronizing the PaymentStatus with the 3rd part payment service provider server- Specified by:
syncPaymentStatusin interfaceChinesePaymentService- Parameters:
orderCode- The code of the order
-
setPaymentInfo
Description copied from interface:ChinesePaymentServiceSaving the PaymentInfo- Specified by:
setPaymentInfoin interfaceChinesePaymentService- Parameters:
cartModel- The current cartchinesePaymentInfoModel- The ChinesePaymentInfo of the cart- Returns:
- true when setting PaymentInfo is successful
-
getPspLogoUrl
Description copied from interface:ChinesePaymentServiceGetting the Logo of the 3rd part payment service providers- Specified by:
getPspLogoUrlin interfaceChinesePaymentService- Returns:
- the url of the payment service provider logo
-
updatePaymentInfoForPlaceOrder
Description copied from interface:ChinesePaymentServiceUpdate payment info after place order- Specified by:
updatePaymentInfoForPlaceOrderin interfaceChinesePaymentService- Parameters:
orderCode- The code of the order
-
getRefundRequestUrl
Description copied from interface:ChinesePaymentServiceGetting the RefundRequestUrl to be send to the 3rd part payment service provider server- Specified by:
getRefundRequestUrlin interfaceChinesePaymentService- 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
-
createTransactionForNewRequest
class for Chinesepspwechatpayservices payment impl.- Parameters:
orderCode- Find Order by the orderCode
-
getMediaService
-
setMediaService
-
getWeChatPayPaymentInfoStrategy
-
setWeChatPayPaymentInfoStrategy
public void setWeChatPayPaymentInfoStrategy(WeChatPayPaymentInfoStrategy weChatPayPaymentInfoStrategy) -
getCommerceCheckoutService
-
setCommerceCheckoutService
-
getConfigurationService
-
setConfigurationService
-
getOrderDao
-
setOrderDao
-
getWeChatPayPaymentTransactionStrategy
- Returns:
- the weChatPayPaymentTransactionStrategy
-
setWeChatPayPaymentTransactionStrategy
public void setWeChatPayPaymentTransactionStrategy(WeChatPayPaymentTransactionStrategy weChatPayPaymentTransactionStrategy) - Parameters:
weChatPayPaymentTransactionStrategy- the weChatPayPaymentTransactionStrategy to set
-
getWeChatPayConfiguration
-
setWeChatPayConfiguration
-
getWeChatPayHttpClient
-
setWeChatPayHttpClient
-
getModelService
- Overrides:
getModelServicein classDefaultPaymentServiceImpl
-
setModelService
- Overrides:
setModelServicein classDefaultPaymentServiceImpl
-
getChineseOrderService
-
setChineseOrderService
-