Class YooKassaServiceImpl

    • Field Detail

      • client

        private ru.loolzaaa.youkassa.client.ApiClient client
    • Constructor Detail

      • YooKassaServiceImpl

        public YooKassaServiceImpl()
    • Method Detail

      • init

        @PostConstruct
        public void init()
      • isYooKassaKeysDefined

        public boolean isYooKassaKeysDefined()
        Description copied from interface: YooKassaService
        Checks if the YooKassa keys are defined.
        Specified by:
        isYooKassaKeysDefined in interface YooKassaService
        Returns:
        true if the YooKassa keys are defined, false otherwise.
      • createPayment

        public ru.loolzaaa.youkassa.model.Payment createPayment​(OrderDTO order)
        Description copied from interface: YooKassaService
        Creates a payment for the specified order.
        Specified by:
        createPayment in interface YooKassaService
        Parameters:
        order - the order for which the payment is created.
        Returns:
        the created payment.
      • chargePayment

        public PaymentStatus chargePayment​(java.lang.String paymentId)
        Description copied from interface: YooKassaService
        Charges the specified payment.
        Specified by:
        chargePayment in interface YooKassaService
        Parameters:
        paymentId - the ID of the payment to be charged.
        Returns:
        the status of the payment after charging.
      • cancelPayment

        public PaymentStatus cancelPayment​(java.lang.String paymentId)
        Description copied from interface: YooKassaService
        Cancels the specified payment.
        Specified by:
        cancelPayment in interface YooKassaService
        Parameters:
        paymentId - the ID of the payment to be canceled.
        Returns:
        the status of the payment after cancellation.
      • refundPayment

        public PaymentStatus refundPayment​(OrderDTO order)
        Description copied from interface: YooKassaService
        Refunds the payment for the specified order.
        Specified by:
        refundPayment in interface YooKassaService
        Parameters:
        order - the order for which the payment is refunded.
        Returns:
        the status of the payment after refunding.
      • payoutToVendor

        public ru.loolzaaa.youkassa.model.Payout payoutToVendor​(Seller vendor,
                                                                java.lang.String orderId,
                                                                long amount)
        Description copied from interface: YooKassaService
        Payouts the specified amount to the vendor.
        Specified by:
        payoutToVendor in interface YooKassaService
        Parameters:
        vendor - the vendor to whom the payout is made.
        orderId - the ID of the order for which the payout is made.
        amount - the amount to be paid out.
        Returns:
        the status of the payout.