Page 1 of 1

Custom Checkout Issues...

Posted: Sat Sep 12, 2009 2:54 pm
by page8workaholic
I'm currently working on a site that requires that an order be authorized and captured before the user is allow to download a digital product. We are wanting the process to be automatic, so I've created a copy of the default CreditCardPaymentForm and have made the following adjustment to check that the order has indeed been captured before moving on to perform additional tasks. The problem is that though the checkout comes back as a success the payment object has a status of AuthorizationFailed. I know that the CC is good too, and the gateway is set to authorize & capture. Can anyone shed some light on what may be happening that would cause the CheckoutResponse to return successful, but the payment method not be captured?

*note: Another strange thing that I noticed is that Authorize.net isn't generating a authorization code, so it is as if the system isn't pushing over all the needed information. From what I can see on the transaction on Authorize.net's side everything except for the authorization code is there.

Code: Select all

            //CREATE THE PAYMENT OBJECT
            Payment payment = GetPayment();
            
            //PROCESS CHECKING OUT EVENT
            bool checkOut = true;
            if (CheckingOut != null)
            {
                CheckingOutEventArgs c = new CheckingOutEventArgs(payment);
                CheckingOut(this, c);
                checkOut = !c.Cancel;
            }
            if (checkOut)
            {
                //PROCESS A CHECKOUT
                CheckoutRequest checkoutRequest = new CheckoutRequest(payment);
                CheckoutResponse checkoutResponse = Token.Instance.User.Basket.Checkout(checkoutRequest);
                if (checkoutResponse.Success)
                {
                    if (CheckedOut != null)
                        CheckedOut(this, new CheckedOutEventArgs(checkoutResponse));

                    #region PAGE8 CUSTOM CODE
                    // BEGIN PAGE8 CUSTOM CODE --------------------------------------------------------------

                    if (payment.PaymentStatus == PaymentStatus.Captured)

Re: Custom Checkout Issues...

Posted: Mon Sep 14, 2009 6:08 am
by AbleMods
page8workaholic wrote:I'm currently working on a site that requires that an order be authorized and captured before the user is allow to download a digital product.
AC7 already supports this scenario. Set the payment gateway to Authorize/Capture mode and set the digital good to Activate on Full Payment.