Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need Help reading code from Contribution


aguzman

Recommended Posts

Posted

I opened an account with verisignFlow Link and need to insert the account information into the contribution but not sure where to put it. The contribution says on line 52 but I'm not a programmer and can't really read the code all that well. Can someone please help me out here.

 

Code is:

 

 

 

<?php
/*
$Id: verisign.php,v 1.16 2002/01/20 16:07:40 hpdl Exp $

The Exchange Project - Community Made Shopping!
http://www.theexchangeproject.org

Copyright (c) 2000,2001 The Exchange Project

Released under the GNU General Public License
*/

class verisign {
var $code, $title, $description, $enabled;

// class constructor
function verisign() {
$this->code = 'verisign';
$this->title = MODULE_PAYMENT_VERISIGN_TEXT_TITLE;
$this->description = MODULE_PAYMENT_VERISIGN_TEXT_DESCRIPTION;
$this->sort_order = MODULE_PAYMENT_VERISIGN_SORT_ORDER;
$this->enabled = ((MODULE_PAYMENT_VERISIGN_STATUS == 'True') ? true : false);
// $this->form_action_url = 'https://payflowlink.verisign.com/payflowlink.cfm';
$this->form_action_url = 'https://payments.verisign.com/payflowlink';
}

// class methods
function javascript_validation() {
return false;
}

function selection() {
return array('id' => $this->code,
'module' => $this->title);
}

function pre_confirmation_check() {
return false;
}

function confirmation() {
return false;
}

function process_button() {
global $_POST, $HTTP_SERVER_VARS, $order, $total_cost, $total_tax, $shipping_cost, $customer_id, $sendto;

$customer_query = hmws_db_query("select c.customers_firstname, c.customers_lastname, c.customers_telephone, c.customers_email_address, ab.entry_street_address, ab.entry_city, ab.entry_country_id, ab.entry_zone_id, ab.entry_state, ab.entry_postcode from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " ab on c.customers_default_address_id = ab.address_book_id and c.customers_id = ab.customers_id where c.customers_id = '" . $customer_id . "'");
$customer_values = hmws_db_fetch_array($customer_query);
$delivery_query = hmws_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_street_address, ab.entry_city, ab.entry_country_id, ab.entry_zone_id, ab.entry_state, ab.entry_postcode from " . TABLE_ADDRESS_BOOK . " ab where ab.address_book_id = '" . $sendto . "' and ab.customers_id = '" . $customer_id . "'");
$delivery_values = hmws_db_fetch_array($delivery_query);

echo hmws_draw_hidden_field('LOGIN', MODULE_PAYMENT_VERISIGN_LOGIN) .
hmws_draw_hidden_field('PARTNER', MODULE_PAYMENT_VERISIGN_PARTNER) .
hmws_draw_hidden_field('TYPE', MODULE_PAYMENT_VERISIGN_TYPE) .
hmws_draw_hidden_field('AMOUNT', number_format($order->info['total'], 2, '.', '')).
hmws_draw_hidden_field('NAME', $customer_values['customers_firstname'] . ' ' . $customer_values['customers_lastname']) .
hmws_draw_hidden_field('ADDRESS', $customer_values['entry_street_address']) .
hmws_draw_hidden_field('CITY', $customer_values['entry_city']) .
hmws_draw_hidden_field('STATE', hmws_get_zone_name($customer_values['entry_country_id'], $customer_values['entry_zone_id'], $customer_values['entry_state'])) .
hmws_draw_hidden_field('ZIP', $customer_values['entry_postcode']) .
hmws_draw_hidden_field('COUNTRY', hmws_get_country_name($customer_values['entry_country_id'])) .
hmws_draw_hidden_field('PHONE', $customer_values['customers_telephone']) .
hmws_draw_hidden_field('EMAIL', $customer_values['customers_email_address']) .
hmws_draw_hidden_field('NAMETOSHIP', $delivery_values['entry_firstname'] . ' ' . $delivery_values['entry_lastname']) .
hmws_draw_hidden_field('ADDRESSTOSHIP', $delivery_values['entry_street_address']) .
hmws_draw_hidden_field('CITYTOSHIP', $delivery_values['entry_city']) .
hmws_draw_hidden_field('STATETOSHIP', hmws_get_zone_name($delivery_values['entry_country_id'], $delivery_values['entry_zone_id'], $delivery_values['entry_state'])) .
hmws_draw_hidden_field('ZIPTOSHIP', $delivery_values['entry_postcode']) .
hmws_draw_hidden_field('COUNTRYTOSHIP', hmws_get_country_name($delivery_values['entry_country_id'])) .
hmws_draw_hidden_field('PHONETOSHIP', $customer_values['customers_telephone']) .
hmws_draw_hidden_field('EMAILTOSHIP', $customer_values['customers_email_address']);

return $process_button_string;
}

function before_process() {
return true;
}

function after_process() {
return false;
}

function output_error() {
return false;
}

function check() {
if (!isset($this->check)) {
$check_query = hmws_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VERISIGN_STATUS'");
$this->check = hmws_db_num_rows($check_query);
}
return $this->check;
}

function install() {
hmws_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable VeriSign', 'MODULE_PAYMENT_VERISIGN_STATUS', 'True', 'Do you want to accept VeriSign payments?', '6', '3', 'hmws_cfg_select_option(array(\'True\', \'False\'), ', now())");
hmws_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Login ID', 'MODULE_PAYMENT_VERISIGN_LOGIN', '', 'Your VeriSign Login ID.', '6', '2', now())");
hmws_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Partner ID', 'MODULE_PAYMENT_VERISIGN_PARTNER', '', 'Your VeriSign Partner ID.', '6', '3', now())");
hmws_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Transaction Type', 'MODULE_PAYMENT_VERISIGN_TYPE', 'S', 'What is the transaction Type? (S = Sales)', '6', '3', now())");
hmws_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_VERISIGN_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
}

function remove() {
hmws_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VERISIGN_STATUS'");
hmws_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VERISIGN_LOGIN'");
hmws_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VERISIGN_PARTNER'");
hmws_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VERISIGN_TYPE'");
hmws_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VERISIGN_SORT_ORDER'");
}

function keys() {
$keys = array('MODULE_PAYMENT_VERISIGN_STATUS', 'MODULE_PAYMENT_VERISIGN_LOGIN', 'MODULE_PAYMENT_VERISIGN_PARTNER', 'MODULE_PAYMENT_VERISIGN_TYPE', 'MODULE_PAYMENT_VERISIGN_SORT_ORDER');

return $keys;
}
}
?>

Posted

$delivery_values = hmws_db_fetch_array($delivery_query);

echo hmws_draw_hidden_field('LOGIN', MODULE_PAYMENT_VERISIGN_LOGIN) .

Line 52 is the blank one in the above code.

 

What info are you supposed to enter?

 

They should have a tech support number to call.

Posted

That code is not from Verisign but from osCommerce Contribution for Verisign. It says to install the contribution then take our verisign account number / information and type it in line 52. But line 52 like you stated is blank and Im not too sure where to put the info. Here is the exact quote from that contribution's install text

 

1. Take the verisign.php file and put it in your

 

/catalog/includes/modules/payment. Open it and in line 52 type your VeriSign login.

 

 

2. Take the verisign.php file and put it in your

 

/catalog/includes/languages/english/modules/payment

 

 

3. Fire up your admin program and go to the payment modules, you should see

 

the verisign on the list. Click Install, and then Edit. You need to enter in your verisign login name, the partner

 

name (usually VeriSign), and the type should be set to S (for sale)

 

 

4. Go into your manager.verisign.com account and under account info>payflow

 

info change the return url to <your domain>/catalog/checkout_process.php (or

 

wherever url you have before the /checkout_process.php )

Posted
That code is not from Verisign but from osCommerce Contribution for Verisign. It says to install the contribution then take our verisign account number / information and type it in line 52. But line 52 like you stated is blank and Im not too sure where to put the info. Here is the exact quote from that contribution's install text

 

Please any help out there??

Posted
1. Take the verisign.php file and put it in your

/catalog/includes/modules/payment. Open it and in line 52 type your VeriSign login.

2. Take the verisign.php file and put it in your

/catalog/includes/languages/english/modules/payment

3. Fire up your admin program and go to the payment modules, you should see

the verisign on the list. Click Install, and then Edit. You need to enter in your verisign login name, the partner

name (usually VeriSign), and the type should be set to S (for sale)

4. Go into your manager.verisign.com account and under account info>payflow

info change the return url to <your domain>/catalog/checkout_process.php (or

wherever url you have before the /checkout_process.php )

Directions from Verisign_1_2_3_4_5

/catalog/includes/modules/payment. Open it and in line 52/53 type your VeriSign login and Partner ID (usually VeriSign).

 

Try it.

Then go to admin. Do you see it in your payment modules?

Posted
Directions from Verisign_1_2_3_4_5

/catalog/includes/modules/payment. Open it and in line 52/53 type your VeriSign login and Partner ID (usually VeriSign).

 

Try it.

Then go to admin. Do you see it in your payment modules?

 

At first u put the files

 

include/module/payment/verisign.php

(it is the big file which has 124 lines)

include/language/module/payment/verisign.php

 

then u go to the admin panel

click modules/payment

(http://<your domain name>/admin/modules.php?set=payment&module=verisign&osCAdminID=03764b5a5f4f4456e64fb9d33b850d8f)

u find the verisign-creditcard in the last row.

click it...then find install option in right panel.....install it...withyour required field.

 

I do the same....It is workin properly

:)

Posted
I opened an account with verisignFlow Link and need to insert the account information into the contribution but not sure where to put it. The contribution says on line 52 but I'm not a programmer and can't really read the code all that well. Can someone please help me out here.

 

Code is:

<?php
/*
$Id: verisign.php,v 1.16 2002/01/20 16:07:40 hpdl Exp $

The Exchange Project - Community Made Shopping!
http://www.theexchangeproject.org

Copyright (c) 2000,2001 The Exchange Project

Released under the GNU General Public License
*/

class verisign {
var $code, $title, $description, $enabled;

// class constructor
function verisign() {
$this->code = 'verisign';
$this->title = MODULE_PAYMENT_VERISIGN_TEXT_TITLE;
$this->description = MODULE_PAYMENT_VERISIGN_TEXT_DESCRIPTION;
$this->sort_order = MODULE_PAYMENT_VERISIGN_SORT_ORDER;
$this->enabled = ((MODULE_PAYMENT_VERISIGN_STATUS == 'True') ? true : false);
// $this->form_action_url = 'https://payflowlink.verisign.com/payflowlink.cfm';
$this->form_action_url = 'https://payments.verisign.com/payflowlink';
}

// class methods
function javascript_validation() {
return false;
}

function selection() {
return array('id' => $this->code,
'module' => $this->title);
}

function pre_confirmation_check() {
return false;
}

function confirmation() {
return false;
}

function process_button() {
global $_POST, $HTTP_SERVER_VARS, $order, $total_cost, $total_tax, $shipping_cost, $customer_id, $sendto;

$customer_query = hmws_db_query("select c.customers_firstname, c.customers_lastname, c.customers_telephone, c.customers_email_address, ab.entry_street_address, ab.entry_city, ab.entry_country_id, ab.entry_zone_id, ab.entry_state, ab.entry_postcode from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " ab on c.customers_default_address_id = ab.address_book_id and c.customers_id = ab.customers_id where c.customers_id = '" . $customer_id . "'");
$customer_values = hmws_db_fetch_array($customer_query);
$delivery_query = hmws_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_street_address, ab.entry_city, ab.entry_country_id, ab.entry_zone_id, ab.entry_state, ab.entry_postcode from " . TABLE_ADDRESS_BOOK . " ab where ab.address_book_id = '" . $sendto . "' and ab.customers_id = '" . $customer_id . "'");
$delivery_values = hmws_db_fetch_array($delivery_query);

echo hmws_draw_hidden_field('LOGIN', MODULE_PAYMENT_VERISIGN_LOGIN) .
hmws_draw_hidden_field('PARTNER', MODULE_PAYMENT_VERISIGN_PARTNER) .
hmws_draw_hidden_field('TYPE', MODULE_PAYMENT_VERISIGN_TYPE) .
hmws_draw_hidden_field('AMOUNT', number_format($order->info['total'], 2, '.', '')).
hmws_draw_hidden_field('NAME', $customer_values['customers_firstname'] . ' ' . $customer_values['customers_lastname']) .
hmws_draw_hidden_field('ADDRESS', $customer_values['entry_street_address']) .
hmws_draw_hidden_field('CITY', $customer_values['entry_city']) .
hmws_draw_hidden_field('STATE', hmws_get_zone_name($customer_values['entry_country_id'], $customer_values['entry_zone_id'], $customer_values['entry_state'])) .
hmws_draw_hidden_field('ZIP', $customer_values['entry_postcode']) .
hmws_draw_hidden_field('COUNTRY', hmws_get_country_name($customer_values['entry_country_id'])) .
hmws_draw_hidden_field('PHONE', $customer_values['customers_telephone']) .
hmws_draw_hidden_field('EMAIL', $customer_values['customers_email_address']) .
hmws_draw_hidden_field('NAMETOSHIP', $delivery_values['entry_firstname'] . ' ' . $delivery_values['entry_lastname']) .
hmws_draw_hidden_field('ADDRESSTOSHIP', $delivery_values['entry_street_address']) .
hmws_draw_hidden_field('CITYTOSHIP', $delivery_values['entry_city']) .
hmws_draw_hidden_field('STATETOSHIP', hmws_get_zone_name($delivery_values['entry_country_id'], $delivery_values['entry_zone_id'], $delivery_values['entry_state'])) .
hmws_draw_hidden_field('ZIPTOSHIP', $delivery_values['entry_postcode']) .
hmws_draw_hidden_field('COUNTRYTOSHIP', hmws_get_country_name($delivery_values['entry_country_id'])) .
hmws_draw_hidden_field('PHONETOSHIP', $customer_values['customers_telephone']) .
hmws_draw_hidden_field('EMAILTOSHIP', $customer_values['customers_email_address']);

return $process_button_string;
}

function before_process() {
return true;
}

function after_process() {
return false;
}

function output_error() {
return false;
}

function check() {
if (!isset($this->check)) {
$check_query = hmws_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VERISIGN_STATUS'");
$this->check = hmws_db_num_rows($check_query);
}
return $this->check;
}

function install() {
hmws_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable VeriSign', 'MODULE_PAYMENT_VERISIGN_STATUS', 'True', 'Do you want to accept VeriSign payments?', '6', '3', 'hmws_cfg_select_option(array(\'True\', \'False\'), ', now())");
hmws_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Login ID', 'MODULE_PAYMENT_VERISIGN_LOGIN', '', 'Your VeriSign Login ID.', '6', '2', now())");
hmws_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Partner ID', 'MODULE_PAYMENT_VERISIGN_PARTNER', '', 'Your VeriSign Partner ID.', '6', '3', now())");
hmws_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Transaction Type', 'MODULE_PAYMENT_VERISIGN_TYPE', 'S', 'What is the transaction Type? (S = Sales)', '6', '3', now())");
hmws_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_VERISIGN_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
}

function remove() {
hmws_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VERISIGN_STATUS'");
hmws_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VERISIGN_LOGIN'");
hmws_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VERISIGN_PARTNER'");
hmws_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VERISIGN_TYPE'");
hmws_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VERISIGN_SORT_ORDER'");
}

function keys() {
$keys = array('MODULE_PAYMENT_VERISIGN_STATUS', 'MODULE_PAYMENT_VERISIGN_LOGIN', 'MODULE_PAYMENT_VERISIGN_PARTNER', 'MODULE_PAYMENT_VERISIGN_TYPE', 'MODULE_PAYMENT_VERISIGN_SORT_ORDER');

return $keys;
}
}
?>

 

replace all hmws_db_query() by tep_db_query(),hmws_db_fetch_array() by tep_db_fetch_array(),hmws_draw_hidden_field() by tep_draw_hidden_field().

hmws_get_zone_name() by tep_get_zone_name(),hmws_get_country_name() by tep_get_country_name,hmws_get_zone_name() by tep_get_zone_name()

hmws_cfg_select_option() by tep_cfg_select_option()

 

:D

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...