Results 1 to 6 of 6

Threaded View

  1. #1
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,762
    Plugin Contributions
    30

    Default using the payment module function get_error

    While investigating this, I see it is used only by /pages/checkout_payment/header_php.php,
    for example
    In the header:
    PHP Code:
    if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) {  $messageStack->add('checkout_payment'$error['error'], 'error');} 
    In the payment module:
    PHP Code:
      function get_error() {
     
    $error = array(
    'title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_ERROR
    'error' => stripslashes(urldecode($_GET['error'])));
    return 
    $error;

    I am assuming this is a way to show a relevant error message to the user when an (offsite?) payment fails and they are redirected back to the checkout_payment page by the gateway.

    I cannot get this to work, I assume that the url should have something like:
    ?payment_error=the_module_name&error=message
    but this just goes to page not found.

    I find no mention of this anywhere so can someone please explain how to use it.
    thanks
    Steve
    Last edited by torvista; 22 Feb 2016 at 10:45 PM. Reason: low energy lightbulb/brain warmed up
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

 

 

Similar Threads

  1. v138a How can i have two languages using the sermepa payment module?
    By zand in forum Addon Payment Modules
    Replies: 1
    Last Post: 13 Jun 2012, 11:56 PM
  2. Undefined function get_error()
    By pdprenty in forum General Questions
    Replies: 5
    Last Post: 29 Aug 2007, 06:58 AM
  3. which is the best payment module for US payments using v 1.3 ?
    By metamp in forum Built-in Shipping and Payment Modules
    Replies: 12
    Last Post: 18 Apr 2007, 09:54 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