Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

tbannist

Archived
  • Posts

    27
  • Joined

  • Last visited

Posts posted by tbannist

  1. I've been looking at the code for payment modules, because I'm trying to write my own and I think I've go this figured out, but I have a couple specific questions on implementing a system where the php script on my site will connect to the gateway and handle the processing without leaving the site.

     

    As I understand payment processing normally has two steps:

     

    1) On the confirmation(checkout_confirmation.php) page, osCommerce checks to see if the selected payment method has a specific url (form_action_url), if so it sends the request to that url instead of the process (checkout_process.php) page. The custom url is supposed to redirect back to the process page.

     

    2) On the process page the order is usually just recorded.

     

    Therefore if I want to silently (and portably) send a transaction to a payment processing gateway without temporarily redirect the user off of my site, I need to add the processing logic to the payment module's before_process method.

     

    However, by default, osCommerce doesn't check for a return value from before_process. So is there a better location to put the transaction processing code? Or should I abort execution in before_process when there's an error and redirect to back to the confirmation page with an error?

  2. I've just updated my Product Query Factory to version 2.0.

     

    Now it also includes all the admin area product queries into the factory. That means it should be very easy to modify the product tables to work however you'd like and only have to modify two files, the query factory for table structure/column names and the defines in application_top for table names.

  3. I just finished uploading a new contribution, Product Query Factory (Misc category). It consolidates all the Product related queries into one location.

     

    This makes it very easy to change columns names and table names for the database, for instance if you need to integrate OSC into a legacy application. It also greatly increase maintainability of the code, by removing duplicate SQL queries from the code base.

     

    It's a simple as changing the define for the table name and changing the columns names in the query factory.

     

    There are a couple of things that I am probably going to tackle in the next week or so:

    • order queries

    user queries

    And some that I am putting off for the forseable future:

     

    • use defined names for the returned column aliases

    only include queries that are needed

  4. I need to change the tables that OSCommerce reads certain data from (like the basic product information and user information). The difficulty is that the query code is scattered through out the many OSCommerce pages. So I've decided to build a Query Factory class, that will make it easy to change the table and column names throughout OSCommerce, by building (eventually) all the queries in one place. However, I'm not sure what type of package this should be. The best category seems to be other.

×
×
  • Create New...