Results 1 to 8 of 8
  1. #1
    Join Date
    May 2011
    Posts
    14
    Plugin Contributions
    0

    cart error Payfast -- Use of gift certificate generates error after payment successful

    Zencart 1.3.9h, not upgraded

    I have set up my Zencart and I am busy testing before going live.

    I set up my store to issue a gift certificate when a new customer registers on the site. When I used that gift certificate, it all worked fine until after payment had been made.

    After payment I was redirected back to my store, but instead of getting to "Checkout Success", I am get to "Step 2 of 3 - Payment Information" and there is a red message displayed saying "It appears that the amount you have tried to apply and your Gift Certificate balance do not match. Please try again." This is after the Gift Certificate has been used and payment has been collected for the purchase amount less the amount applied from the gift certificate balance.

    To the customer, it looks as if the purchase has been unsuccessful and the shopping cart still contains the items that were purchased. However, Zencart has generated the order.

    Obviously this is a problem because the customer knows that payment has been collected already, but the purchase appears unsuccessful. Most customers will not first check if their orders are listed under "My Account" to see if an order has been generated. Is there a setting I need to change to allow customers to use their gift certificates?

    Many thanks for your assistance.

  2. #2
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: Use of gift certificate generates error after payment successful

    What Addons have you installed? What payment methods do you have active?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    May 2011
    Posts
    14
    Plugin Contributions
    0

    Default Re: Use of gift certificate generates error after payment successful

    I have installed one add-on to add an extra payment method called Payfast. Payfast is a payment gateway. I initially had a problem with the shopping cart in that an order was not generated despite checkout success. The Payfast technical support team checked out my installation and corrected the error.

    The Payfast payment gateway works fine. However, if a gift certificate is used, the order is generated, but the customer is returned to the Payment Information page with the error message. It seems that when the gift certificate is used, the gift certificate amount on the Payment Information page is not cleared. The customer's balance is zero since the gift certificate was used with the order, but the website seems to think the customer is trying to use the gift certificate again. Not sure if the explanation is very clear.

    I can give you details of the site and set the payment gateway to test mode so you can check it out if that would be helpful?

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Use of gift certificate generates error after payment successful

    Quote Originally Posted by bruce View Post
    After payment I was redirected back to my store, but instead of getting to "Checkout Success", I am get to "Step 2 of 3 - Payment Information" and there is a red message displayed saying "It appears that the amount you have tried to apply and your Gift Certificate balance do not match. Please try again." This is after the Gift Certificate has been used and payment has been collected for the purchase amount less the amount applied from the gift certificate balance.
    That's not normal, and certainly not how the software was written.

    Sounds like a problem in your payment module or code customizations or addons.

    Additionally, I can't replicate that activity using a fresh clean uncustomized install using built-in payment modules and demo products.

    Try turning on the Check/MoneyOrder payment module, and do a checkout with that, using Gift Cert as part of the payment.
    How does the experience differ?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    May 2011
    Posts
    14
    Plugin Contributions
    0

    Default Re: Use of gift certificate generates error after payment successful

    Thanks, Dr Byte.

    Using the Check/Money Order module does work correctly and CheckOut_Success is confirmed.

    What I can't work out with the Payfast module is that somehow the pre_confirmation_check($order_total) function is being invoked before the checkout_success page is reached. It seems that maybe the session variables are not being properly cleared, but I have gone through the Payfast.php module and immediately before the zen_redirect to checkout_success command, the $order_total_modules->clear_posts() command is given. I have also compared the code in the before_process function per the payfast.php module to the code per the paypal.php module and they are identical.

    They both call $order_total_modules->clear_posts(); and then zen_redirect( zen_href_link( FILENAME_CHECKOUT_SUCCESS, '', 'SSL' ) );

    Is there any way of debugging this in a step through fashion and keeping track of the environment variables while doing so?

  6. #6
    Join Date
    May 2011
    Posts
    14
    Plugin Contributions
    0

    Default Re: Use of gift certificate generates error after payment successful

    This must be a Payfast specific issue - I tested using the Paypal Express Checkout and it works correctly.

    I am a little bit stuck now.

  7. #7

    Default Re: Payfast -- Use of gift certificate generates error after payment successful

    We have stepped through our code, and for some reason the before_process function in our module is not being called by Zen-Cart. Our module works fine on our test systems, but not on Bruce's.

    Can anyone point out as to why this would happen? As Bruce points out, our before_process is practically identical to PayPal's. Doing a search on this forum shows many payment modules seem to be effected as of late, but we've yet to find a solution.

  8. #8
    Join Date
    Apr 2012
    Posts
    1
    Plugin Contributions
    0

    Default Re: Use of gift certificate generates error after payment successful

    Hello

    Please can you tell me how you installed the Payfast module. As when i go to Zencarts payment module to install, Payfast is not there as an option in Zencart 1.5?

    Quote Originally Posted by bruce View Post
    I have installed one add-on to add an extra payment method called Payfast. Payfast is a payment gateway. I initially had a problem with the shopping cart in that an order was not generated despite checkout success. The Payfast technical support team checked out my installation and corrected the error.

    The Payfast payment gateway works fine. However, if a gift certificate is used, the order is generated, but the customer is returned to the Payment Information page with the error message. It seems that when the gift certificate is used, the gift certificate amount on the Payment Information page is not cleared. The customer's balance is zero since the gift certificate was used with the order, but the website seems to think the customer is trying to use the gift certificate again. Not sure if the explanation is very clear.

    I can give you details of the site and set the payment gateway to test mode so you can check it out if that would be helpful?

 

 

Similar Threads

  1. v153 No Items in Orders even after successful PayPal payment
    By Raymond Mantle in forum General Questions
    Replies: 4
    Last Post: 16 Oct 2014, 07:01 AM
  2. v150 Only show gift certificate option on payment page if customer has a gift certificate
    By ShopVille in forum Templates, Stylesheets, Page Layout
    Replies: 25
    Last Post: 21 Jul 2014, 08:03 PM
  3. Want to use a printed gift certificate (with code) in the gift certificate process?
    By HelenSama in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 9
    Last Post: 15 Apr 2008, 02:04 PM
  4. Multiple Use for Gift Certificate
    By Rogue Tiger in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 5
    Last Post: 1 Apr 2008, 03:33 PM
  5. After successful install ( error?)
    By neewby in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 27 Aug 2006, 04:15 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR