Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default Re: Which Method should the module use to launch payment

    Firstly, why are you echoing out the return url? The process_button function is called to create the process button. The return here should be a bunch of hidden variables, so that when the containing form is submitted, these are submitted with it. If you need to send the CC number, name, and amount to the gateway, you can eitehr do this here, as hidden variables, or send them by CURL In a later function. You should never need to reirect from this function, as it is loaded half-way down a page.

    Secondly, with the $messageStack, have you included the line: global $messageStack within the function, as $messageStack is a global variable, and so it's not normally available within functions due to its scope.

    Absolute

  2. #12
    Join Date
    Oct 2007
    Location
    France & Luxembourg
    Posts
    37
    Plugin Contributions
    0

    Default Re: Which Method should the module use to launch payment

    Thanks again aboslute for getting back to me.

    The echo of the URL is to check if itīs the correct one i am redirecting to.

    OK i understand now the purpose of the method,
    itīs not intended for redirecting.

    I will move it down to the before_process() to make it happen then.
    I guess this will fix redirect to work, since you didnīt say it has dependecies of some other files like "application_top".

    I have another problem with the payment process,
    and then it might be completely streamlined to zencart.

    In fact, when i try on my localhost, payment transaction tracking works,
    so does order creation and such.
    BUT when called by the payment provider or another machine on my network,
    it fails to execute verify & response handling, sending them to a session-time-out page of zencart. I guess this is because the cookies arenīt set or some other session variables are gone.
    How could i fix this ?

    Today i wonīt be able to try out too much as i am afk this afternoon.
    Anyway , many thanks for any help.

  3. #13
    Join Date
    Oct 2007
    Location
    France & Luxembourg
    Posts
    37
    Plugin Contributions
    0

    Default avoid the session expired message when calling checkout_process.php from another se

    Sometimes a weekend can help to get another look at the code.
    • How to pass variables from one method to another.

    Well this was a little bit tricky for someone who is not used to working with methods and forms.
    My final technique was more obvious than i expected. To pass variables from process_button() to before_process(),
    i just used it as zencart was designed.
    Added a hidden form fields into the final confirmation form
    to pass my URL to the next method where then the redirect happens.

    But how will i avoid the session expired message when calling
    checkout_process.php from another server ?
    Last edited by mypashop; 4 Feb 2008 at 11:30 AM. Reason: removed signature

  4. #14
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default Re: Which Method should the module use to launch payment

    It depends on how you are transferring the data between servers. If you are redirecting your customers to the payment gateway, and then they are returning, then you can include the ZenID in the URL to recreate the session if you need to.

    Absolute

  5. #15
    Join Date
    Oct 2007
    Location
    France & Luxembourg
    Posts
    37
    Plugin Contributions
    0

    Default Re: Which Method should the module use to launch payment

    i tried hard,
    it still redirects to time_out (session expired error)
    i can retrieve the session_id correctly and

    i copypaste it into firefox on another machine and call
    index.php?main_page=checkout_process?ZenID=somession_id_here

    just like the payment server would, with some more variables added.

    zen cart redirects to gateway, along with infos & now also zen id
    gateway calls checkout_process (POST) to verify
    gateway calls checkout_process (POST) to respond
    gateway redirects to checkout_process (LINK on their page)
    to send customer to success/fail

    In either stages, it makes an time-out happen,
    making verification impossible because of HTML being outputted instead of variable/value pairs.


    what is the security token related to ?
    Last edited by mypashop; 4 Feb 2008 at 01:08 PM. Reason: removed signature & imporved typo

  6. #16
    Join Date
    Oct 2007
    Location
    France & Luxembourg
    Posts
    37
    Plugin Contributions
    0

    Default Re: Which Method should the module use to launch payment

    i just tried calling

    checkout_process
    with zenid= zen id of the session
    and securitytoken of the session

    same result , time out

    it seems it cannot retrieve the session.

    maybe the way it's called is not correct ?
    at the moment the variables are passed by GET calling the URL,
    but the gateway will send thru POST ?

  7. #17
    Join Date
    Oct 2007
    Location
    France & Luxembourg
    Posts
    37
    Plugin Contributions
    0

    Default Re: Which Method should the module use to launch payment

    Hi again...

    Getting it done, it seems impossible.

    While there's a solution to the session time out by
    making the verify / response actions happen in external files
    (no html will be outputted, since no timeout occurs),

    there's still a problem to trigger the before_process() method,
    once the transactions are updated.

    I tried this
    in a file called in case of a success
    > make some updates to the order
    > set a message to be displayed in message stack
    > zen_redirect(zen_href_link(filename_checkout_process, null, SSL));

    lost
    going home

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Which shipping or payment module I should use?
    By futurist71 in forum Addon Shipping Modules
    Replies: 1
    Last Post: 16 Jul 2011, 11:03 AM
  2. Which Paypal method should I use?
    By atmosx in forum General Questions
    Replies: 4
    Last Post: 14 Dec 2009, 12:49 PM
  3. No Payment Options - This is currently the only payment method available to use on ..
    By keeno79 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 11 May 2009, 02:58 PM
  4. Need input on which payment module to use.
    By jodib in forum Addon Payment Modules
    Replies: 0
    Last Post: 15 Aug 2007, 01:24 AM
  5. Which payment method should I offer?
    By yellow1912 in forum Built-in Shipping and Payment Modules
    Replies: 8
    Last Post: 3 Aug 2007, 10:57 PM

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