Class DefaultWeChatPayPaymentService

    • Constructor Detail

      • DefaultWeChatPayPaymentService

        public DefaultWeChatPayPaymentService()
    • Method Detail

      • handleAsyncResponse

        public java.lang.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 java.lang.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​(java.lang.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 java.lang.String getPaymentRequestUrl​(java.lang.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​(java.lang.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
      • getPspLogoUrl

        public java.lang.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
      • getRefundRequestUrl

        public java.util.Optional<java.lang.String> getRefundRequestUrl​(java.lang.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​(java.lang.String orderCode)
        class for Chinesepspwechatpayservices payment impl.
        Parameters:
        orderCode - Find Order by the orderCode
      • setMediaService

        public void setMediaService​(MediaService mediaService)
      • setWeChatPayPaymentInfoStrategy

        public void setWeChatPayPaymentInfoStrategy​(WeChatPayPaymentInfoStrategy weChatPayPaymentInfoStrategy)
      • setCommerceCheckoutService

        public void setCommerceCheckoutService​(CommerceCheckoutService commerceCheckoutService)
      • setConfigurationService

        public void setConfigurationService​(ConfigurationService configurationService)
      • getWeChatPayPaymentTransactionStrategy

        public WeChatPayPaymentTransactionStrategy getWeChatPayPaymentTransactionStrategy()
        Returns:
        the weChatPayPaymentTransactionStrategy
      • setWeChatPayPaymentTransactionStrategy

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

        public void setWeChatPayConfiguration​(WeChatPayConfiguration weChatPayConfiguration)
      • setWeChatPayHttpClient

        public void setWeChatPayHttpClient​(WeChatPayHttpClient weChatPayHttpClient)
      • setChineseOrderService

        public void setChineseOrderService​(ChineseOrderService chineseOrderService)