Class PaymentService

java.lang.Object
de.bytestore.hostinger.ecommerce.service.PaymentService

@Transactional @Component @Service public class PaymentService extends Object
  • Constructor Details

    • PaymentService

      public PaymentService()
  • Method Details

    • webhooks

      public void webhooks()
    • createPayment

      public Payment createPayment(Invoice invoiceIO, String providerIO)
      Creates a payment based on the given invoice.
      Parameters:
      invoiceIO - the invoice for which the payment needs to be created
      providerIO -
      Returns:
      the created payment object
    • authorize

      public boolean authorize(jakarta.servlet.http.HttpServletRequest requestIO, jakarta.servlet.http.HttpServletResponse responseIO, String providerIO) throws Exception
      Authorizes a payment request with the specified provider.
      Parameters:
      requestIO - the HTTP servlet request object
      responseIO - the HTTP servlet response object
      providerIO - the name of the payment provider
      Throws:
      Exception - if an error occurs during authorization
    • refreshPayment

      public Payment refreshPayment(Payment paymentIO)
      Refreshes a payment by querying all available payment extension points for an updated payment object.
      Parameters:
      paymentIO - the payment object to be refreshed
      Returns:
      the refreshed payment object
    • getPayment

      public List<Payment> getPayment(String idIO)
      Retrieves a list of Payment objects based on the specified token.
      Parameters:
      idIO - the token used to filter the payments
      Returns:
      a list of Payment objects that match the given token
    • list

      public List<PaymentExtensionPoint> list()
      Retrieves a list of PaymentExtensionPoint objects from the moduleService.
      Returns:
      A List of PaymentExtensionPoint objects.