Recurring payment is not triggering after schedule the Event in Eway Payment Gateway (Australia)

34 views Asked by At

I have configured the eWay payment gateway in my c# mvc project.

Now customer & Event is created but payment has not occurred. I add dummy card details and pass throgh api but after that i can see the all events till my payment last date but non of them are occured. All payment status showing me as Future.

Following is the code for add customer and Create eventId. No error comes in this code and customer is created successfully. Problem is payment is not occured.

Here below is the code for adding customer and Event. I get the Customer and eventId from the responce.

public ActionResult ProcessRecurringPayment(string emailId)
{
    string ewayCustomerId = GenerateEwayCustomerId(); // Replace with actual logic

    if (!string.IsNullOrEmpty(ewayCustomerId))
    {
        string rebillCustomerID = CreateRebillCustomer(ewayCustomerId, emailId);

        if (!string.IsNullOrEmpty(rebillCustomerID))
        {
            string rebillEventID = CreateRebillEvent(rebillCustomerID);

            if (!string.IsNullOrEmpty(rebillEventID))
            {
                List<PaymentDetails> payments = GetRebillCustomerPayments(rebillCustomerID);

                // Do something with the payments
                // For example, display them in a view
                return View("PaymentsView", payments);
            }
        }
    }
    return RedirectToAction("Failure");
}
0

There are 0 answers