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 Details

    • DefaultWeChatPayPaymentService

      public DefaultWeChatPayPaymentService()
  • Method Details

    • handleAsyncResponse

      public String handleAsyncResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Description copied from interface: ChinesePaymentService
      Handling the Asyn-response of the 3rd part payment service provider server
      Specified by:
      handleAsyncResponse in interface ChinesePaymentService
      Parameters:
      request - The HttpServletRequest
      response - 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: ChinesePaymentService
      Handling the Sync-response of the 3rd part payment service provider server
      Specified by:
      handleSyncResponse in interface ChinesePaymentService
      Parameters:
      request - The HttpServletRequest
      response - The HttpServletResponse
      Returns:
      the code of the order
    • cancelPayment

      public boolean cancelPayment(String orderCode)
      Description copied from interface: ChinesePaymentService
      Canceling the payment with the 3rd part payment service provider server
      Specified by:
      cancelPayment in interface ChinesePaymentService
      Parameters:
      orderCode - The code of the order
      Returns:
      true when canceling payment is successful
    • getPaymentRequestUrl

      public String getPaymentRequestUrl(String orderCode)
      Description copied from interface: ChinesePaymentService
      Getting the PaymentRequestUrl to be send to the 3rd part payment service provider server
      Specified by:
      getPaymentRequestUrl in interface ChinesePaymentService
      Parameters:
      orderCode - The code of the order
      Returns:
      the payment request Url of the 3rd part payment service provider
    • syncPaymentStatus

      public void syncPaymentStatus(String orderCode)
      Description copied from interface: ChinesePaymentService
      Synchronizing the PaymentStatus with the 3rd part payment service provider server
      Specified by:
      syncPaymentStatus in interface ChinesePaymentService
      Parameters:
      orderCode - The code of the order
    • setPaymentInfo

      public boolean setPaymentInfo(CartModel cartModel, ChinesePaymentInfoModel chinesePaymentInfoModel)
      Description copied from interface: ChinesePaymentService
      Saving the PaymentInfo
      Specified by:
      setPaymentInfo in interface ChinesePaymentService
      Parameters:
      cartModel - The current cart
      chinesePaymentInfoModel - The ChinesePaymentInfo of the cart
      Returns:
      true when setting PaymentInfo is successful
    • getPspLogoUrl

      public String getPspLogoUrl()
      Description copied from interface: ChinesePaymentService
      Getting the Logo of the 3rd part payment service providers
      Specified by:
      getPspLogoUrl in interface ChinesePaymentService
      Returns:
      the url of the payment service provider logo
    • updatePaymentInfoForPlaceOrder

      public void updatePaymentInfoForPlaceOrder(String orderCode)
      Description copied from interface: ChinesePaymentService
      Update payment info after place order
      Specified by:
      updatePaymentInfoForPlaceOrder in interface ChinesePaymentService
      Parameters:
      orderCode - The code of the order
    • getRefundRequestUrl

      public Optional<String> getRefundRequestUrl(String orderCode)
      Description copied from interface: ChinesePaymentService
      Getting the RefundRequestUrl to be send to the 3rd part payment service provider server
      Specified by:
      getRefundRequestUrl in interface ChinesePaymentService
      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

      public void createTransactionForNewRequest(String orderCode)
      class for Chinesepspwechatpayservices payment impl.
      Parameters:
      orderCode - Find Order by the orderCode
    • getMediaService

      public MediaService getMediaService()
    • setMediaService

      public void setMediaService(MediaService mediaService)
    • getWeChatPayPaymentInfoStrategy

      public WeChatPayPaymentInfoStrategy getWeChatPayPaymentInfoStrategy()
    • setWeChatPayPaymentInfoStrategy

      public void setWeChatPayPaymentInfoStrategy(WeChatPayPaymentInfoStrategy weChatPayPaymentInfoStrategy)
    • getCommerceCheckoutService

      public CommerceCheckoutService getCommerceCheckoutService()
    • setCommerceCheckoutService

      public void setCommerceCheckoutService(CommerceCheckoutService commerceCheckoutService)
    • getConfigurationService

      public ConfigurationService getConfigurationService()
    • setConfigurationService

      public void setConfigurationService(ConfigurationService configurationService)
    • getOrderDao

      public WeChatPayOrderDao getOrderDao()
    • setOrderDao

      public void setOrderDao(WeChatPayOrderDao orderDao)
    • getWeChatPayPaymentTransactionStrategy

      public WeChatPayPaymentTransactionStrategy getWeChatPayPaymentTransactionStrategy()
      Returns:
      the weChatPayPaymentTransactionStrategy
    • setWeChatPayPaymentTransactionStrategy

      public void setWeChatPayPaymentTransactionStrategy(WeChatPayPaymentTransactionStrategy weChatPayPaymentTransactionStrategy)
      Parameters:
      weChatPayPaymentTransactionStrategy - the weChatPayPaymentTransactionStrategy to set
    • getWeChatPayConfiguration

      protected WeChatPayConfiguration getWeChatPayConfiguration()
    • setWeChatPayConfiguration

      public void setWeChatPayConfiguration(WeChatPayConfiguration weChatPayConfiguration)
    • getWeChatPayHttpClient

      protected WeChatPayHttpClient getWeChatPayHttpClient()
    • setWeChatPayHttpClient

      public void setWeChatPayHttpClient(WeChatPayHttpClient weChatPayHttpClient)
    • getModelService

      protected ModelService getModelService()
      Overrides:
      getModelService in class DefaultPaymentServiceImpl
    • setModelService

      public void setModelService(ModelService modelService)
      Overrides:
      setModelService in class DefaultPaymentServiceImpl
    • getChineseOrderService

      protected ChineseOrderService getChineseOrderService()
    • setChineseOrderService

      public void setChineseOrderService(ChineseOrderService chineseOrderService)