User Tools

Site Tools


how_to_create_a_payment_module

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
how_to_create_a_payment_module [2019/11/08 17:36]
admin [settings()]
how_to_create_a_payment_module [2021/07/15 00:05] (current)
info@litecart.net
Line 200: Line 200:
     ...     ...
          
-    $myview = new view();+    $myview = new ent_view();
     $myview->snippets = array(     $myview->snippets = array(
       userdata => @$this->userdata,       userdata => @$this->userdata,
Line 307: Line 307:
         'cancel_url' => document::ilink('checkout'),         'cancel_url' => document::ilink('checkout'),
         'success_url' => document::ilink('order_process'),         'success_url' => document::ilink('order_process'),
-        'callback_url' => document::link(WS_DIR_EXT . 'payment_service_provider/my_external_callback_file.php', array('order_uid' => $order->data['uid'])), // An order always have a uid even though it is not saved+        'callback_url' => document::link(WS_DIR_APP . 'ext/payment_service_provider/my_external_callback_file.php', array('order_uid' => $order->data['uid'])), // An order always have a uid even though it is not saved
       );       );
              
Line 367: Line 367:
 ===== settings() ===== ===== settings() =====
  
-This method sets up the payment module with a settings structure. The return is an array of the structure.  The functions supported are listed in func_form.inc.php form_draw_function().+This method sets up the payment module with a settings structure. The return is an array of the structure.
  
 <code php> <code php>
Line 435: Line 435:
 ===== Callbacks ===== ===== Callbacks =====
  
-Some payment service providers offers machine-to-machine data exchange during the transaction. In such cases you might need a listener for callbacks. Here is an example of an external script that will call a method inside the module called callback().+Some payment service providers offers machine-to-machine data exchange during the transaction takes part. In such cases you will need a callback function. Here is an example of an external script that will call a method inside the module called callback().
  
 <code php /ext/provider/callback.php> <code php /ext/provider/callback.php>
Line 469: Line 469:
      
 // Initiate $order as the order object // Initiate $order as the order object
-  //$order = new ctrl_order('load', $order['id']); // LiteCart 1.+  $order = new ent_order($order['id']); // LiteCart 2.2
-  $order = new ctrl_order($order['id']); // LiteCart 2.0+
      
 // Get the order's payment option // Get the order's payment option
how_to_create_a_payment_module.1573230979.txt.gz · Last modified: 2019/11/08 17:36 by admin