Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Posts
    460
    Plugin Contributions
    0

    Default Re: New payment module with javascript call

    if we put in the javascript that is inside of includes -> modules -> pages -> checkout_confirmation
    $price_string, it doesn't find it even if it is defined in the selected payment module.

    Total price can be found if we put <?php number_format($order->info['total'], 2);?> but not if we use the one defined in the payment module as $price_string. So the ZC standard parameters can be picked. How do we pick our own ones from the folder includes -> modules -> payment to be used inside the javascript file of includes -> modules -> pages -> checkout_confirmation?
    We need also similar way other parameters picked up from the module for the same javascript call.
    I may be blond but at least I found Zen.

  2. #2
    Join Date
    Sep 2005
    Posts
    460
    Plugin Contributions
    0

    Default Re: New payment module with javascript call

    Quote Originally Posted by ellivir View Post
    if we put in the javascript that is inside of includes -> modules -> pages -> checkout_confirmation
    $price_string, it doesn't find it even if it is defined in the selected payment module.

    Total price can be found if we put <?php number_format($order->info['total'], 2);?> but not if we use the one defined in the payment module as $price_string. So the ZC standard parameters can be picked. How do we pick our own ones from the folder includes -> modules -> payment to be used inside the javascript file of includes -> modules -> pages -> checkout_confirmation?
    We need also similar way other parameters picked up from the module for the same javascript call.
    ok, there is a header_php.php file in this respective page folder "checkout_confirmation" and when we put the parameters there the system seems to find them.
    Now we can pay the products with the payment interface, the sum and other values are passed to the payment provider. From there it comes an answer as POST value of a signature that we need to compare in the server and if that is correct match, the payment was successful. In which function in the payment module this comparison should happen and how do we let the system to proceed when pushing the button "confirm" the order? We should somehow tell what to do when the POST value is correct (CHECKOUT SUCCESS) and when it is not correct to go back (CHECKOUT PAYMENT).
    I may be blond but at least I found Zen.

  3. #3
    Join Date
    Sep 2005
    Posts
    460
    Plugin Contributions
    0

    Default Re: New payment module with javascript call

    ok, now we added this

    $this->form_action_url = zen_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false); // Page to go

    and we started to get order confirmation emails but as a customer we are not yet leaving from the checkout confirmation page and for the customer it looks like the payment was not registered. The customer may click again the confirm button and then it comes another email.

    We have privately made a new payment module for a system of small payment provider. Now finally we got into the checkout confirmation page and the payment happens on the top of that page (without leaving the site) and even the order email arrives to a test customer.
    BUT the customer can't go from the checkout confirmation page to the success page. It is going back to the payment page and then when going further it makes another order confirmation by email but the customer doesn't see the success page and for him it looks like it didn't work.

    From the payment module:
    Is our function after_process like this ok (is this the right place for this?):

    function after_process() {
    if ($_POST[“sig”] == md5( $secret_key . “&” . $pricestring . “&” . $items )) {
    $_SESSION['cart']->reset(true);
    unset($_SESSION['cart']);
    $_SESSION['order_created'] = '';
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_SUCCESS));
    } else {
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT));
    }
    }

    Would anybody have any idea where to tell for the system that now the order is process and it was a success?
    I may be blond but at least I found Zen.

 

 

Similar Threads

  1. How to call specific images with javascript?
    By GodfatherAntiques in forum General Questions
    Replies: 0
    Last Post: 18 Jan 2011, 08:25 PM
  2. Problems with new payment module
    By Dayo in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 1 Feb 2008, 11:47 PM
  3. Checkout probelms with new payment module
    By Namheul in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 1 Mar 2007, 12:18 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