Page 1 of 2 12 LastLast
Results 1 to 10 of 41

Hybrid View

  1. #1
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: eWAY Payment Gateway - Rapid 3.0 API

    Instead of modifying ZC core code (as shown in my last post), a more elegant way of overcoming the currency symbol issue is this hack:

    In the file includes/modules/payment/eway_rapid.php find this code

    PHP Code:
      /**
       * Build the data and actions to process when the "Submit" button is pressed on the order-confirmation screen.
       * This sends the data to the payment gateway for processing.
       * (These are hidden fields on the checkout confirmation page)
       *
       * @return string
       */
      
    function process_button() {
            global 
    $db$order$currencies$currency$messageStack
    Immediately after that insert

    PHP Code:
            
          
    // bof force change currency code to AUD -- frank18 20160306
            
    $show_charged_amount false;
            if (!
    in_array($order->info['currency'], array('AUD'))) {
                
    // we are not in default currency so we need to change currency code to default AUD as eWay only accepts AUD
                
    $order->info['currency'] = zen_currency_exists(DEFAULT_CURRENCYfalse);
                
    // now show the customer what they are being charged in $AUD
                
    $show_charged_amount true;
                
    $displayed_amount number_format($order->info['total'], 2'.''');
             }
          
    // eof force change currency code to AUD -- frank18 20160306 
    To show the customer what and how they are being charged, in the same file find

    PHP Code:
            echo '<!-- Begin eWAY Linking Code --> 
    Just before that code insert

    PHP Code:
            // bof heading added -- frank18 20160306
            
    echo '<h2>eWAY Payment Details</h2>';
            if (
    $show_charged_amount) {
               echo 
    '<div id="ewayRapidPayment">Your payment will be processed in Australian Dollars ($AUD)</div>';
               echo 
    'Amount charged in $AUD ' $displayed_amount;
               }
            echo 
    '<h3>(Payment will appear on your Credit Card Statement as <b>WHATEVER YOU WANT TO SAY HERE</b>)</h3>';
            
    // eof heading added -- frank18 20160306 

    With this modification we are only passing the currency code AUD instead of the customer selected currency code (eg USD, EUR, NZD etc), the functionality of the original eWay code is not changed at all.

    All shopping cart and checkout pages continue to show the customer chosen currency and values.
    Last edited by frank18; 6 Mar 2016 at 08:13 AM.

  2. #2
    Join Date
    Apr 2016
    Posts
    18
    Plugin Contributions
    0

    Default Re: eWAY Payment Gateway - Rapid 3.0 API

    I've tried both eWay shared and redirect but It seems that 80% of orders although processed successfully don't redirect to the checkout confirmation page and the order isn't logged in Zen Cart.

    Has anyone experienced something similar and what was the cause?

  3. #3
    Join Date
    Feb 2010
    Location
    New South Wales, Australia
    Posts
    228
    Plugin Contributions
    0

    Default Re: eWAY Payment Gateway - Rapid 3.0 API

    Quote Originally Posted by ivopivo View Post
    I've tried both eWay shared and redirect but It seems that 80% of orders although processed successfully don't redirect to the checkout confirmation page and the order isn't logged in Zen Cart.

    Has anyone experienced something similar and what was the cause?
    I've had the same thing happen a few times. It was usually when the customer had entered the CR number wrong a couple of times. Don't know a fix though sorry.

  4. #4
    Join Date
    Apr 2016
    Posts
    18
    Plugin Contributions
    0

    Default Re: eWAY Payment Gateway - Rapid 3.0 API

    Quote Originally Posted by robbie269 View Post
    I've had the same thing happen a few times. It was usually when the customer had entered the CR number wrong a couple of times. Don't know a fix though sorry.
    Yeah I noticed that too. If you leave spaces in the numbers, it won't give an error, just redirect to the main page. Seems like a very "raw" module. Would have thought eWay would have made more of an effort. Guessing they don't have many Zen Cart users.

  5. #5
    Join Date
    Feb 2010
    Location
    New South Wales, Australia
    Posts
    228
    Plugin Contributions
    0

    Default Re: eWAY Payment Gateway - Rapid 3.0 API

    Quote Originally Posted by ivopivo View Post
    Seems like a very "raw" module. Would have thought eWay would have made more of an effort. Guessing they don't have many Zen Cart users.
    I've had people put in two payments for one order a few times too. It happens when they hit the button twice. Module needs a wait wheel so that people know to wait!

  6. #6
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: eWAY Payment Gateway - Rapid 3.0 API

    Quote Originally Posted by robbie269 View Post
    I've had people put in two payments for one order a few times too. It happens when they hit the button twice. Module needs a wait wheel so that people know to wait!
    Happened to me once (customer hit the button twice) and implemented this (wait wheel or similar) in a 1.5.4 store.

    Found an animated "We are processing your payment.... Please Wait" image in a Google image search (use whatever suits you but observe the Copyright notice). Named that image processing_animation.gif and placed it into the /images folder for use with any template.

    Then open includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_confirmation_default.php - scroll to the bottom of the file and find

    PHP Code:
    <?php 
      
    echo zen_draw_form('checkout_confirmation'$form_action_url'post''id="checkout_confirmation" onsubmit="submitonce();"'); 
     
      if (
    is_array($payment_modules->modules)) { 
        echo 
    $payment_modules->process_button(); 
      } 
    ?> 
    <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CONFIRM_ORDERBUTTON_CONFIRM_ORDER_ALT'name="btn_submit" id="btn_submit"') ;?></div> 
    </form> 
    <div class="buttonRow back"><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE '<br />' TEXT_CONTINUE_CHECKOUT_PROCEDURE?></div>
    change to

    PHP Code:
    <?php 
      
    echo zen_draw_form('checkout_confirmation'$form_action_url'post''id="checkout_confirmation" onsubmit="submitonce();"'); 
     
      if (
    is_array($payment_modules->modules)) { 
        echo 
    $payment_modules->process_button();   
      }     
    ?> 
    <div class="centeredContent"><img id="actionImg" src = "images/processing_animation.gif" class="hiddenField" /></div> 
    <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CONFIRM_ORDERBUTTON_CONFIRM_ORDER_ALT'name="btn_submit" id="btn_submit"') ;?><br /><?php echo '<b>Press ONLY ONCE ....</b>';?></div> 
    </form> 
    <div class="buttonRow back"><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE '<br />' TEXT_CONTINUE_CHECKOUT_PROCEDURE?></div>
    That image also shows up for other payment modules (eg PayPal ... slow response etc) - never had this issue ever since.

  7. #7
    Join Date
    Feb 2010
    Location
    New South Wales, Australia
    Posts
    228
    Plugin Contributions
    0

    Default Re: eWAY Payment Gateway - Rapid 3.0 API

    Quote Originally Posted by frank18 View Post
    That image also shows up for other payment modules (eg PayPal ... slow response etc) - never had this issue ever since.
    Thank you! I'll do that as soon as I find a nice image.

  8. #8
    Join Date
    Feb 2010
    Location
    New South Wales, Australia
    Posts
    228
    Plugin Contributions
    0

    Default Re: eWAY Payment Gateway - Rapid 3.0 API

    Quote Originally Posted by frank18 View Post
    <div class="centeredContent"><img id="actionImg" src = "images/processing_animation.gif" class="hiddenField" />
    Does the image only show if there is a delay? Can't see it when I do a test order.

  9. #9
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: eWAY Payment Gateway - Rapid 3.0 API

    Quote Originally Posted by frank18 View Post
    Happened to me once (customer hit the button twice) and implemented this (wait wheel or similar) in a 1.5.4 store.

    Found an animated "We are processing your payment.... Please Wait" image in a Google image search (use whatever suits you but observe the Copyright notice). Named that image processing_animation.gif and placed it into the /images folder for use with any template.

    Then open includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_confirmation_default.php - scroll to the bottom of the file and find

    PHP Code:
    <?php 
      
    echo zen_draw_form('checkout_confirmation'$form_action_url'post''id="checkout_confirmation" onsubmit="submitonce();"'); 
     
      if (
    is_array($payment_modules->modules)) { 
        echo 
    $payment_modules->process_button(); 
      } 
    ?> 
    <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CONFIRM_ORDERBUTTON_CONFIRM_ORDER_ALT'name="btn_submit" id="btn_submit"') ;?></div> 
    </form> 
    <div class="buttonRow back"><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE '<br />' TEXT_CONTINUE_CHECKOUT_PROCEDURE?></div>
    change to

    PHP Code:
    <?php 
      
    echo zen_draw_form('checkout_confirmation'$form_action_url'post''id="checkout_confirmation" onsubmit="submitonce();"'); 
     
      if (
    is_array($payment_modules->modules)) { 
        echo 
    $payment_modules->process_button();   
      }     
    ?> 
    <div class="centeredContent"><img id="actionImg" src = "images/processing_animation.gif" class="hiddenField" /></div> 
    <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CONFIRM_ORDERBUTTON_CONFIRM_ORDER_ALT'name="btn_submit" id="btn_submit"') ;?><br /><?php echo '<b>Press ONLY ONCE ....</b>';?></div> 
    </form> 
    <div class="buttonRow back"><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE '<br />' TEXT_CONTINUE_CHECKOUT_PROCEDURE?></div>
    That image also shows up for other payment modules (eg PayPal ... slow response etc) - never had this issue ever since.

    If the image does not show when the order confirmation button is clicked the open the file

    includes/modules/pages/checkout_confirmation/jscript_main.php

    and find

    PHP Code:
    function submitonce() 
    Change the entire function to read

    PHP Code:
    function submitonce() 

      var 
    button document.getElementById("btn_submit"); 
      var 
    img document.getElementById("actionImg"); 
      
    button.style.cursor="wait"
      
    button.disabled true
      
    button.className 'hiddenField'
      
    img.className ''
      
    setTimeout('button_timeout()'5000); 
      return 
    false

    You can change the timeout value to anything lesser or more.

    Hope this helps.

  10. #10
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: eWAY Payment Gateway - Rapid 3.0 API

    Quote Originally Posted by ivopivo View Post
    I've tried both eWay shared and redirect but It seems that 80% of orders although processed successfully don't redirect to the checkout confirmation page and the order isn't logged in Zen Cart.

    Has anyone experienced something similar and what was the cause?
    Have used eWay now for some months, never had this happening.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Pin Payments Payment Gateway [Support Thread]
    By chrisdahl in forum Addon Payment Modules
    Replies: 25
    Last Post: 6 Feb 2019, 07:06 AM
  2. v155 Billplz Payment Gateway - Malaysia [Support Thread]
    By wanzulnet in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 25 Jul 2016, 01:03 AM
  3. v154 PagaMasTarde payment gateway support thread
    By afatsini-pmt in forum Addon Payment Modules
    Replies: 0
    Last Post: 19 Nov 2015, 01:17 PM
  4. v151 checkout page problem using eWAY-rapid payment module
    By tpeck in forum Addon Payment Modules
    Replies: 13
    Last Post: 27 Jun 2014, 09:39 AM

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