Interface YooKassaService

  • All Known Implementing Classes:
    YooKassaServiceImpl

    public interface YooKassaService
    This interface represents a service for interacting with the YooKassa payment system.
    • Method Detail

      • isYooKassaKeysDefined

        boolean isYooKassaKeysDefined()
        Checks if the YooKassa keys are defined.
        Returns:
        true if the YooKassa keys are defined, false otherwise.
      • createPayment

        ru.loolzaaa.youkassa.model.Payment createPayment​(OrderDTO order)
        Creates a payment for the specified order.
        Parameters:
        order - the order for which the payment is created.
        Returns:
        the created payment.
      • chargePayment

        PaymentStatus chargePayment​(java.lang.String paymentId)
        Charges the specified payment.
        Parameters:
        paymentId - the ID of the payment to be charged.
        Returns:
        the status of the payment after charging.
      • cancelPayment

        PaymentStatus cancelPayment​(java.lang.String paymentId)
        Cancels the specified payment.
        Parameters:
        paymentId - the ID of the payment to be canceled.
        Returns:
        the status of the payment after cancellation.
      • refundPayment

        PaymentStatus refundPayment​(OrderDTO order)
        Refunds the payment for the specified order.
        Parameters:
        order - the order for which the payment is refunded.
        Returns:
        the status of the payment after refunding.
      • payoutToVendor

        ru.loolzaaa.youkassa.model.Payout payoutToVendor​(Seller vendor,
                                                         java.lang.String orderId,
                                                         long amount)
        Payouts the specified amount to the vendor.
        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.