Forums / Addon Payment Modules / Create a new module for International Checkout payment module

Create a new module for International Checkout payment module

Locked

Started by icecold on 3 Dec 2009, 8:09 PM · Views: 13,224

Results 61 to 64 of 64
This thread is locked. New replies are disabled.
26 Apr 2010, 5:33 PM
#61
icecold avatar

icecold

Zen Follower

Join Date:
Jul 2008
Posts:
360
Plugin Contributions:
0

Create a new module for International Checkout payment module

DrByte:

get_products() will return an array ... which you can't display by merely using echo(). You would need to echo print_r($products, TRUE) if you wanted to see the array contents that way

ok now I am getting somewhere ... my output is ...

Payment module name: ic
Admin title for the module International Checkout Payments
Admin description for the module International Checkout Payments
True, the number 1 means is enabled

Products Image[0] path:images/HP-E6930p.jpg
Products Image[0] Width: 50
Products Image[0] Height: 40
Products Quantity[0] :4
Products price[0] path:$2,320.00
Products price[0] each path:$580.00
Products Image[1] path:images/HP-E6930p.jpg
Products Image[1] Width: 50
Products Image[1] Height: 40
Products Quantity[1] :1
Products price[1] path:$560.00
Products price[1] each path:$560.00
Products in cart:

26 Apr 2010, 6:53 PM
#62
icecold avatar

icecold

Zen Follower

Join Date:
Jul 2008
Posts:
360
Plugin Contributions:
0

Re: Create a new module for International Checkout payment module

icecold:

ok now I am getting somewhere ... my output is ...

Payment module name: ic
Admin title for the module International Checkout Payments
Admin description for the module International Checkout Payments
True, the number 1 means is enabled

Products Image[0] path:images/HP-E6930p.jpg
Products Image[0] Width: 50
Products Image[0] Height: 40
Products Quantity[0] :4
Products price[0] path:$2,320.00
Products price[0] each path:$580.00
Products Image[1] path:images/HP-E6930p.jpg
Products Image[1] Width: 50
Products Image[1] Height: 40
Products Quantity[1] :1
Products price[1] path:$560.00
Products price[1] each path:$560.00
Products in cart:

Recent OUTPUT using the testing server html source code:

Payment module name: ic
<br>Admin title for the module International Checkout Payments
<br>Admin description for the module International Checkout Payments
<br>True, the number 1 means is enabled<br>
<br>Products Image[0] path:<strong>https://www.store.com/store/images/HP-E6930p.jpg</strong><br>
Products Image[0] Width: <strong>150</strong><br>
Products Image[0] Height: <strong>150</strong><br>
Products Quantity[0]: <strong><input name="cart_quantity[]" value="6" size="4" type="text"></strong><br>
Products price[0]: <strong>$3,480.00</strong><br>
Products price[0] each: <strong>$580.00</strong><br>
Products Image[1] path:<strong>https://www.store.com/store/images/HP-E6930p.jpg</strong><br>
Products Image[1] Width: <strong>150</strong><br>
Products Image[1] Height: <strong>150</strong><br>
Products Quantity[1]: <strong><input name="cart_quantity[]" value="1" size="4" type="text"></strong><br>
Products price[1]: <strong>$560.00</strong><br>
Products price[1] each: <strong>$560.00</strong><br>
<p></p><h1>
Products Array Loop thru contents</h1><p></p>
productsImage ... https://www.store.com/store/images/HP-E6930p.jpg <br>
productsName ... Hewlett Packard HP-E6930p Business Laptop <br>
quantityField ... <input name="cart_quantity[]" value="6" size="4" type="text"> <br>
productsPrice ... $3,480.00 <br>
productsPriceEach ... $580.00 <br>
id ... 2 <br>
productsImage ... https://www.store.com/store/images/HP-E6930p.jpg <br>
productsName ... Hewlett Packard HP-E6920p Business Laptop <br>
quantityField ... <input name="cart_quantity[]" value="1" size="4" type="text"> <br>
productsPrice ... $560.00 <br>
productsPriceEach ... $560.00 <br>
id ... 1 <br>
<p>Your session ID is f9b5f16d3f3e5ec0a604b570b5d0c2d8.</p>
27 Apr 2010, 12:13 AM
#63
icecold avatar

icecold

Zen Follower

Join Date:
Jul 2008
Posts:
360
Plugin Contributions:
0

Re: Create a new module for International Checkout payment module

so far so good but where the module method has to be called in order to pass the hidden fields to the form?

In this line inside the module ic I call for a bogus action, but nothing happens from the line of code after //This is not working:

function ic() {
    global $order;

    $this->code = 'ic';
    if (IS_ADMIN_FLAG === true) {
      // Payment module title in Admin
      $this->title = MODULE_PAYMENT_IC_TEXT_ADMIN_TITLE;
    } else {
      $this->title = MODULE_PAYMENT_IC_TEXT_CATALOG_TITLE;
    }
    $this->description = MODULE_PAYMENT_IC_TEXT_DESCRIPTION;
    $this->sort_order = MODULE_PAYMENT_IC_SORT_ORDER;
    $this->enabled = ((MODULE_PAYMENT_IC_STATUS == 'True') ? true : false);
 // This is not working 
 $this->form_action_url = "https://sandbox.php";
//works fine    
if ((int)MODULE_PAYMENT_IC_ORDER_STATUS_ID > 0) {
      $this->order_status = MODULE_PAYMENT_IC_ORDER_STATUS_ID;
    }

    if (is_object($order)) $this->update_status();
  }
27 Apr 2010, 2:04 AM
#64
icecold avatar

icecold

Zen Follower

Join Date:
Jul 2008
Posts:
360
Plugin Contributions:
0

Re: Create a new module for International Checkout payment module

icecold:

so far so good but where the module method has to be called in order to pass the hidden fields to the form?

In this line inside the module ic I call for a bogus action, but nothing happens from the line of code after //This is not working:

function ic() {
global $order;

$this->code = 'ic';
if (IS_ADMIN_FLAG === true) {
  // Payment module title in Admin
  $this->title = MODULE_PAYMENT_IC_TEXT_ADMIN_TITLE;
} else {
  $this->title = MODULE_PAYMENT_IC_TEXT_CATALOG_TITLE;
}
$this->description = MODULE_PAYMENT_IC_TEXT_DESCRIPTION;
$this->sort_order = MODULE_PAYMENT_IC_SORT_ORDER;
$this->enabled = ((MODULE_PAYMENT_IC_STATUS == 'True') ? true : false);

// Note a full bogus URL doesn't work, no error messages
$this->form_action_url = "https://www.store.com/store/sandbox.php";
//works fine
if ((int)MODULE_PAYMENT_IC_ORDER_STATUS_ID > 0) {
$this->order_status = MODULE_PAYMENT_IC_ORDER_STATUS_ID;
}

if (is_object($order)) $this->update_status();

}


I made a typo before but I am not getting form_action_url to work ... as there are no errors ... no nothing ...