Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    Sep 2010
    Posts
    48
    Plugin Contributions
    1

    Default Re: allocated order number

    sorry I'm still scratching my head on this one

    please can someone outline the processing flow within zen-cart from after the 3rd party sends me back to the store
    everything i'm reading points to getting to
    PHP Code:
     function before_process() {
    // RESPONSE ACTION DEFINED

    but nothing is seemingly being processed there, even if i only have a simple redirect to an intercept page (to check I got there!)

    after returning to the store I am consistently given a 404 Page Not Found

    where should I be handling the responses?
    and what should my urls be if not
    PHP Code:
    $posturl =  zen_href_link(FILENAME_CHECKOUT_PROCESS); 
        
    $returnurlzen_href_link(FILENAME_CHECKOUT_PROCESS); 

    Here's the integration guidance i'm working with:

    Transaction Responses are posted back to the script in the post url:
    • transaction_status – either A (Approved) or D (Declined)
    • transaction_value_pence – as passed and processed
    • order_number – as passed
    • date_time - Date and time of order (YYYY-MM-DD HH:MM:SS)

    The order_number is appended to the returnurl (as ono).
    the GET method allows you to identify the returning cardholder, and typically perform a database lookup on
    your own server to ascertain what transaction status result was delivered to the Post URL for that particular
    cardholder.
    as i read it, the post url is sending the transaction responses to the store to be processed behind the scenes, so where should i place my code checking for A or D (saving to the DB etc)?
    i'm figuring once i have dealt with the post responses and
    the customer returns to the store, i'm coding a $db look up to check if their transaction was successful or not and redirect then accordingly,
    where do i do this? i was thinking it handled with
    PHP Code:
    $payment_modules->after_process(); 
    ...

    but, without getting the responses dealt with i haven't got to that bit yet!!

    I’m just not spotting what i’m missing!
    Last edited by ajmn; 18 Jun 2013 at 08:34 AM.

  2. #12
    Join Date
    Jan 2004
    Posts
    66,385
    Blog Entries
    7
    Plugin Contributions
    81

    Default Re: allocated order number

    Put your transaction verification logic into before_process()
    .

    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.

  3. #13
    Join Date
    Sep 2010
    Posts
    48
    Plugin Contributions
    1

    Default Re: allocated order number

    Just as I thought... and have been trying... and still failing to see it acted upon!

    I've managed to write and run some code that will effectively bypass the deadzone, i.e. write the response data and the order details, to the DB in a custom testing table, and then land the customer on the correct final page (either back on checkout_payment or checkout_success), however, i'm still not able to route it through the before_process or after_process.

    I know, it’s obvious, the final stages of the sale is not being handled correctly!
    i'm even able to use the DB via the zen-cart syntax because i'm still having to operate outside the zen-processs...
    the order does not appear in the my account history pages even if i write to the correct DB tables
    ~ I don't want to rewrite the whole of the checkout section!
    i know haven’t fully figured the correct flow,
    i’ve looked at dozens of other payment mods and they ALL do things slightly differently so there’s no clear example
    other than the occasional bit of syntax that looks the same, but then it’s been placed in a different places, so they are not easily comparable,
    i don’t think i’ve found one that has the same/or similar structure that i need.

    I feel I'm almost there but still so far away... I might try a few other variations including rearranging the actual location of the code, (writing a custom header etc).

    Any way, I need the store live ASAP, so in the meantime i'm going to break from this and use another standard payment method....
    when finished though (with the what now seems the trivial) and the store is live.... 'I will be back', as someone once said....
    hopefully not still using a car to break through the walls but using the door as it should be used! I’ll let you know what happens.

  4. #14
    Join Date
    Jan 2004
    Posts
    66,385
    Blog Entries
    7
    Plugin Contributions
    81

    Default Re: allocated order number

    Care to post a zip of the affected files?
    .

    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. #15
    Join Date
    Sep 2010
    Posts
    48
    Plugin Contributions
    1

    Default Re: allocated order number

    Success !!
    Phew, was that a hurdle or what!!

    Just need to tidy up ~ removing all the commented duff lines, checking the file structure is efficient etc.,

    it still needs thorough testing,
    but looking forward to presenting it to y'all

  6. #16
    Join Date
    Aug 2006
    Location
    Kihikihi, New Zealand
    Posts
    230
    Plugin Contributions
    3

    Default Re: allocated order number

    Hi ajmn,

    I am looking at doing a similar thing for a new website I am currently building.
    I have always found the sequential order no system problematic specially for sites that receive few orders, or like the one I am currently working on.

    It does not instill any customer confidence in a site when you are the first one to place an order and get order no 00001 or so. Again if I wanted to buy another product a few months later and my new order number may be 00024.

    As a customer I would seriously question the validity of the site.
    So an automatically generated O/N such as yyyymmddhhmmss would be a great option, as it immediately identyfies the exact date etc. the order was placed.

    The only bug I see would be if your sever would be in a different timezone than your shop, and you decide to include a timezone offset some time in the future.

    Do you have a working version yet?

    Kind regards,

    Goshawk
    Time is but an illusion, there is only "now"!

  7. #17
    Join Date
    Sep 2010
    Posts
    48
    Plugin Contributions
    1

    Default Re: allocated order number

    yyyymmddhhmmss would easily become tzyyyymmddhhmmss instead.

    >Do you have a working version yet?
    yes,
    I've been taking a brief break and was hoping to get onto it again very soon ~ tidying up rewrite etc with a fresh set of eyes.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. How can I change the order number for order page?
    By ttmb33 in forum Customization from the Admin
    Replies: 1
    Last Post: 9 May 2010, 07:50 PM
  2. start from say order number #1215 rather than order number 1
    By vandiermen in forum Managing Customers and Orders
    Replies: 4
    Last Post: 18 Mar 2009, 02:07 PM
  3. Creates duplicate order number but no order in cart
    By songenterprises in forum Managing Customers and Orders
    Replies: 1
    Last Post: 7 Nov 2007, 06:00 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