Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need Help with my PayPal Payment Method on my OSCommerce checkout_payment.php page


Recommended Posts

Posted

Hello,

 

I am having a problem with the Payment Methods in my checkout. I have both the PayPal Option selected in my Payment Module, but it does not appear on my checkout_payment page. How do I make it so that they appear and are available on my Checkout page? I may have lost sales because of this problem, so I need to get it it fixed ASAP!

The following script is my checkout_payment.php:

?php

/*

$Id: checkout_payment.php,v 1.113 2003/06/29 23:03:27 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

// if the customer is not logged on, redirect them to the login page

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

 

// if there is nothing in the customers cart, redirect them to the shopping cart page

if ($cart->count_contents() 1) {

tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

}

 

// if no shipping method has been selected, redirect the customer to the shipping method selection page

if (!tep_session_is_registered('shipping')) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

}

 

// avoid hack attempts during the checkout procedure by checking the internal cartID

if (isset($cart->cartID) && tep_session_is_registered('cartID')) {

if ($cart->cartID != $cartID) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

}

}

 

// Stock Check

if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) {

$products = $cart->get_products();

for ($i=0, $n=sizeof($products); $i$n; $i++) {

if (tep_check_stock($products[$i]['id'], $products[$i]['quantity'])) {

tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

break;

}

}

}

 

// if no billing destination address was selected, use the customers own address as default

if (!tep_session_is_registered('billto')) {

tep_session_register('billto');

$billto = $customer_default_address_id;

} else {

// verify the selected billing address

$check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$billto . "'";

$check_address = tep_db_fetch_array($check_address_query);

 

if ($check_address['total'] != '1') {

$billto = $customer_default_address_id;

if (tep_session_is_registered('payment')) tep_session_unregister('payment');

}

}

 

require(DIR_WS_CLASSES . 'order.php');

$order = new order;

 

if (!tep_session_is_registered('comments')) tep_session_register('comments');

 

$total_weight = $cart->show_weight();

$total_count = $cart->count_contents();

 

// load all enabled payment modules

require(DIR_WS_CLASSES . 'payment.php');

$payment_modules = new payment;

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT);

 

$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

$breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

?>

 

?php echo HTML_PARAMS; ?>>

 

<meta http-equiv="Content-Type" content="text/html; charset=?php echo CHARSET; ?>">

?php echo TITLE; ?>

 

 

<script language="javascript"></script>

?php echo $payment_modules->javascript_validation(); ?>

 

 

 

?php require(DIR_WS_INCLUDES . 'header.php'); ?>

 

 

 

 

?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

 

 

 

?php echo tep_draw_form('checkout_payment', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', 'onsubmit="return check_form();"'); ?>

 

?php echo HEADING_TITLE; ?>

?php echo tep_image(DIR_WS_IMAGES . 'table_background_payment.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?>

 

 

 

 

?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?>

 

?php

if (isset($HTTP_GET_VARS['payment_error']) && is_object(${$HTTP_GET_VARS['payment_error']}) && ($error = ${$HTTP_GET_VARS['payment_error']}->get_error())) {

?>

 

 

?php echo tep_output_string_protected($error['title']); ?>

 

 

 

 

 

 

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

?php echo tep_output_string_protected($error['error']); ?>

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

 

 

 

 

 

 

?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?>

 

?php

}

?>

 

 

?php echo TABLE_HEADING_BILLING_ADDRESS; ?>

 

 

 

 

 

 

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

?php echo TEXT_SELECTED_BILLING_DESTINATION; ?>

 

?php echo '' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . ''; ?>

 

?php echo TITLE_BILLING_ADDRESS; ?>

?php echo tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?>

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

?php echo tep_address_label($customer_id, $billto, true, ' ', '

'); ?>

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

 

 

 

 

 

 

 

 

?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?>

 

 

 

?php echo TABLE_HEADING_PAYMENT_METHOD; ?>

 

 

 

 

 

?php

$selection = $payment_modules->selection();

 

if (sizeof($selection) > 1) {

?>

 

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

?php echo TEXT_SELECT_PAYMENT_METHOD; ?>

?php echo TITLE_PLEASE_SELECT; ?>

?php echo tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?>

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

 

?php

} else {

?>

 

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

?php echo TEXT_ENTER_PAYMENT_INFORMATION; ?>

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

 

?php

}

 

$radio_buttons = 0;

for ($i=0, $n=sizeof($selection); $i$n; $i++) {

?>

 

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

?php

if ( ($selection[$i]['id'] == $payment) || ($n == 1) ) {

echo '' . "\n";

} else {

echo '' . "\n";

}

?>

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

?php echo $selection[$i]['module']; ?>

 

?php

if (sizeof($selection) > 1) {

echo tep_draw_radio_field('payment', $selection[$i]['id']);

} else {

echo tep_draw_hidden_field('payment', $selection[$i]['id']);

}

?>

 

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

 

?php

if (isset($selection[$i]['error'])) {

?>

 

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

?php echo $selection[$i]['error']; ?>

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

 

?php

} elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {

?>

 

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

?php

for ($j=0, $n2=sizeof($selection[$i]['fields']); $j$n2; $j++) {

?>

 

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

?php echo $selection[$i]['fields'][$j]['title']; ?>

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

?php echo $selection[$i]['fields'][$j]['field']; ?>

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

 

?php

}

?>

 

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

 

?php

}

?>

 

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

 

?php

$radio_buttons++;

}

?>

 

 

 

 

 

?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?>

 

 

 

?php echo TABLE_HEADING_COMMENTS; ?>

 

 

 

 

 

 

?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?>

 

 

 

 

 

 

?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?>

 

 

 

 

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '

' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?>

?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?>

?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

 

 

 

 

 

 

?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?>

 

 

 

 

?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?>

?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?>

 

 

 

?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?>

?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?>

?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?>

 

 

?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?>

 

?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?>

?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?>

 

 

 

 

?php echo '' . CHECKOUT_BAR_DELIVERY . ''; ?>

?php echo CHECKOUT_BAR_PAYMENT; ?>

?php echo CHECKOUT_BAR_CONFIRMATION; ?>

?php echo CHECKOUT_BAR_FINISHED; ?>

 

 

 

 

 

?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

 

 

 

 

 

 

 

?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

 

 

 

 

 

?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

I am not a programmer, so I would not know where to start to change it.

 

 

Mark Burkhardt, MCP

Posted

We would need to see how you've configured your PayPal module in the admin to make sure that it's properly enabled.

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

  • 1 year later...
Posted
We would need to see how you've configured your PayPal module in the admin to make sure that it's properly enabled.

 

 

I'm having the same issue. any possibility of you telling us what you need in order to see if the configuration is correct, or better yet, can you supply the information for us to check?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...