Jump to content
Sign in to follow this  
dynamoeffects

PayPal WPP Direct Payments & Express Checkout Support

Recommended Posts

I am trying to implement Direct Payments with Paypal under osCommerce. The problem I seem to be running into is that Paypal does not show up as a payment option on the checkout_payment.php page. I know this is probably a stupid question but how does this payment module do Direct Payments?

Share this post


Link to post
Share on other sites

I did the setup got my sandbox account and had been testing for the past week. I today decided to go live and attempted to fill out the application. I got to the second page after having my account upgraded to business and getting a test charge to my c-card. Then the notice showed up "no service for paypal pro in the Virgin Islands or us territory". Gave them a call and they claim that the system is new and they do not cover my area yet.

 

I'm still crying. :angry:

Edited by kebo

Share this post


Link to post
Share on other sites

Can this be configured to be a standalone with the same features except for the api and such?

Share this post


Link to post
Share on other sites

@jpearce: Follow the instructions in the README file to complete the installation and you will see the credit card fields on checkout_payment.php

 

@kebo: What do you mean by "standalone?"


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.

Share this post


Link to post
Share on other sites

What I mean is to separate the credit card part so you can use another merchant like “merchantinc” and change the button link to a paypal pay button for people with paypal accounts. I don’t mind paying for a taylored version for me. I think it’s a great mod.

 

I have spent quite a bit of money on stocks already and want to get my site fully functional.

Edited by kebo

Share this post


Link to post
Share on other sites

Do you mean that you just want Express Checkout, but not Direct Payment? If so, you don't need to be paying for PayPal Pro as Express Checkout is free for business and premier accounts. There's also a contribution maintained by AlexStudio for adding Express Checkout to your store.


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.

Share this post


Link to post
Share on other sites

Can you help with this one?

 

After I make the changes to admin/orders.php I get an error when trying to access that page:

 

Fatal error: Cannot redeclare class currencies in /home/sites/spacomponents.co.uk/public_html/admin/includes/classes/currencies.php on line 16

Here is the top of the code in the file:

 

<?php

/*

$Id: orders.php 8777 2006-03-20 16:17:17Z jim $

 

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');

//---PayPal WPP Modification START ---//

//Since the admin's configure.php file is STILL missing defines

include(DIR_FS_DOCUMENT_ROOT . DIR_WS_INCLUDES . 'configure.php');

 

include(DIR_WS_CLASSES . 'order.php');

 

require(DIR_WS_CLASSES . 'currencies.php');

$currencies = new currencies();

 

include(DIR_WS_INCLUDES . 'paypal_wpp/paypal_wpp_include.php');

$paypal_wpp = new paypal_wpp_admin;

//---PayPal WPP Modification END ---//

 

require(DIR_WS_CLASSES . 'currencies.php');

$currencies = new currencies();

 

$orders_statuses = array();

$orders_status_array = array();

$orders_status_query = tep_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . (int)$languages_id . "'");

while ($orders_status = tep_db_fetch_array($orders_status_query)) {

$orders_statuses[] = array('id' => $orders_status['orders_status_id'],

'text' => $orders_status['orders_status_name']);

$orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name'];

}

 

 

 

I removed the code (shown coloured RED) and I then get this message:

 

Fatal error: Cannot redeclare class order in /home/sites/spacomponents.co.uk/public_html/admin/includes/classes/order.php on line 13

Can you point me in the right direction to resolve this?

 

Thanks

Share this post


Link to post
Share on other sites
@jpearce: Follow the instructions in the README file to complete the installation and you will see the credit card fields on checkout_payment.php

 

I went back through and double-checked the modifications to make sure they were all in place. Everything seems to be there, however the fields are still not showing up. I was having this same problem with the payment module from Paypal (which has been removed).

Is there something specific I might be missing that would prevent it from showing the needed fields on the payment page?

Share this post


Link to post
Share on other sites

@datawebuk: Check out Step #15, part 2.

 

@jpearce: In that case, it could be a problem with your store's codebase. Do any other payment module work? Make sure that this module doesn't have the same sort order as any others.


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.

Share this post


Link to post
Share on other sites
@datawebuk: Check out Step #15, part 2.

 

@jpearce: In that case, it could be a problem with your store's codebase. Do any other payment module work? Make sure that this module doesn't have the same sort order as any others.

 

 

OK, I missed that one. Thank you.

 

I have a problem editing shopping_cart.php as per Step #10 - I can't locate where to add the code. Here is my file:

 

<?php

/*

$Id: shopping_cart.php 10709 2006-09-04 10:28:24Z jim $

 

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");

 

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

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART));

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

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

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

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

<!-- header_eof //-->

 

<!-- body //-->

<table border="0" width="100%" cellspacing="3" cellpadding="3">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

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

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_cart.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

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

</tr>

<?php

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

?>

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[0][] = array('align' => 'center',

'params' => 'class="productListing-heading"',

'text' => TABLE_HEADING_REMOVE);

 

$info_box_contents[0][] = array('params' => 'class="productListing-heading"',

'text' => TABLE_HEADING_PRODUCTS);

 

$info_box_contents[0][] = array('align' => 'center',

'params' => 'class="productListing-heading"',

'text' => TABLE_HEADING_QUANTITY);

 

$info_box_contents[0][] = array('align' => 'right',

'params' => 'class="productListing-heading"',

'text' => TABLE_HEADING_TOTAL);

 

$any_out_of_stock = 0;

$products = $cart->get_products();

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

// Push all attributes information in an array

if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {

while (list($option, $value) = each($products[$i]['attributes'])) {

echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);

$attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix

from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa

where pa.products_id = '" . (int)$products[$i]['id'] . "'

and pa.options_id = '" . (int)$option . "'

and pa.options_id = popt.products_options_id

and pa.options_values_id = '" . (int)$value . "'

and pa.options_values_id = poval.products_options_values_id

and popt.language_id = '" . (int)$languages_id . "'

and poval.language_id = '" . (int)$languages_id . "'");

$attributes_values = tep_db_fetch_array($attributes);

 

$products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];

$products[$i][$option]['options_values_id'] = $value;

$products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name'];

$products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];

$products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];

}

}

}

 

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

if (($i/2) == floor($i/2)) {

$info_box_contents[] = array('params' => 'class="productListing-even"');

} else {

$info_box_contents[] = array('params' => 'class="productListing-odd"');

}

 

$cur_row = sizeof($info_box_contents) - 1;

 

$info_box_contents[$cur_row][] = array('align' => 'center',

'params' => 'class="productListing-data" valign="top"',

'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id']));

 

$products_name = '<table border="0" cellspacing="2" cellpadding="2">' .

' <tr>' .

' <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .

' <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';

 

if (STOCK_CHECK == 'true') {

$stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);

if (tep_not_null($stock_check)) {

$any_out_of_stock = 1;

 

$products_name .= $stock_check;

}

}

 

if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {

reset($products[$i]['attributes']);

while (list($option, $value) = each($products[$i]['attributes'])) {

$products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';

}

}

 

$products_name .= ' </td>' .

' </tr>' .

'</table>';

 

$info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"',

'text' => $products_name);

 

$info_box_contents[$cur_row][] = array('align' => 'center',

'params' => 'class="productListing-data" valign="top"',

'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));

 

$info_box_contents[$cur_row][] = array('align' => 'right',

'params' => 'class="productListing-data" valign="top"',

'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>');

}

 

new productListingBox($info_box_contents);

?>

</td>

</tr>

<tr>

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

</tr>

<tr>

<td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></b></td>

</tr>

<?php

if ($any_out_of_stock == 1) {

if (STOCK_ALLOW_CHECKOUT == 'true') {

?>

<tr>

<td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></td>

</tr>

<?php

} else {

?>

<tr>

<td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></td>

</tr>

<?php

}

}

?>

<tr>

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

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td class="main"><?php echo tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART); ?></td>

<?php

$back = sizeof($navigation->path)-2;

if (isset($navigation->path[$back])) {

?>

<td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td>

<?php

}

?>

<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<?php

} else {

?>

<tr>

<td align="center" class="main"><?php new infoBox(array(array('text' => TEXT_CART_EMPTY))); ?></td>

</tr>

<tr>

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

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<?php

}

?>

</table></form></td>

<!-- body_text_eof //-->

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

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

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

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

<!-- footer_eof //-->

<br>

</body>

</html>

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

Share this post


Link to post
Share on other sites
@jpearce: In that case, it could be a problem with your store's codebase. Do any other payment module work? Make sure that this module doesn't have the same sort order as any others.

 

I tried the built-in credit Card and COD modules seem to display correctly. I have removed all the module except this one and yet it still does not seem to function. The only other 'custom' module I have running as part of the checkout process is something to do real-time FedEx shipping quotes. Is there something particular to this Paypal module with regards to shipping?

Share this post


Link to post
Share on other sites

@datawebuk: I'd guesstimate here:

</tr>
</table></td>
</tr>
</table></td>
</tr>

CODE GOES HERE

<?php
} else {
?>
<tr>
<td align="center" class="main"><?php new infoBox(array(array('text' => TEXT_CART_EMPTY))); ?></td>
</tr>

 

@jpearce: No, this shouldn't be affecting shipping. Also make sure that "Payment Zone" in the module's settings is set to "--None--".


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.

Share this post


Link to post
Share on other sites
@jpearce: No, this shouldn't be affecting shipping. Also make sure that "Payment Zone" in the module's settings is set to "--None--".

 

... That did it. XD

 

Thanks. :3

Share this post


Link to post
Share on other sites
Is it possible to use WPP with MORE than 1 online store?

 

I received an answer from PayPal about this today, and you can use WPP with more than one store. The IPN notification URL set in your module's settings and sent with each transaction is the URL supercedes any IPN notification URL you have set in your profile. So if you have two stores with two different domain names, the IPN notification URLs will be different and PayPal should respond to the correct stores as transactions update.


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.

Share this post


Link to post
Share on other sites

Brian,

 

I am getting the error below now when I go live when I click on PayPal Express Checkout. Any idea how to resolve?

 

error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca (Error No. 35)

 

 

Thanks

Share this post


Link to post
Share on other sites

It's caused by using a sandbox certificate on the live servers or vice versa.


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.

Share this post


Link to post
Share on other sites

Thanks so much - I forgot to change to the Live Certificate from the Sandbox Cert when i went live. Everything is now working great!

Share this post


Link to post
Share on other sites

Hello Brian,

 

First off I want to say thank you very much for your dedication to support your contribution. It is very powerful and efficient. I am only using the direct payments part of it and it works great! I encourage everyone/anyone to donate money for this contribution if you are thinking about donating to at least 1 contribution via oscommerce.

 

The reason why I'm here is because I was wondering if it were possible to add a charge to a customer WITHOUT asking for their credit card details. The reason why I ask is after a week of processing orders we found a bug in our coupon coding that gave the customer a 100% discount on their order instead of the shipping. This caused problems and we eventually had the customer agree for us to change their order. The only problem is that we couldnt add a charge without asking for their credit card information again (and I doubt any customer would want to do that). In the end we had to refund the order for the customer to reorder.. of course they never came back. Is there a way to accomplish the ability to charge without asking?

 

-Jack Corbis

Share this post


Link to post
Share on other sites

No, the module does not store any credit card information, so it's not possible to recharge the card without asking the customer for their details again. You'd first have to setup a PCI-compliant method of storing the cards, then modify the module to pull those card numbers in, which may be cost prohibitive for some merchants.

 

A cheaper alternative I've seen recently is Authorize.net's Customer Information Manager service that will store the customer's card data at Authorize.net and can be accessed using a security key to charge the card again at a later date. However, I'm not sure if there are any contributions available to take advantage of it.


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.

Share this post


Link to post
Share on other sites

thanks Brian, I figured that was the case. Just out of curiosity, since I havent used the feature yet. When you "add a charge" does it update the order status of the same order (ie. does it show up in the order for record)?

Share this post


Link to post
Share on other sites

Hello:

This is my third PayPal module in four years. I have high hopes that this one is the answer. I am in the process of installing now. I have two questions:

I receive the following error when accessing the diagnostics file. I do have curl installed and it is working in other applications. Is this a deal breaker?

Does cURL work? (Simple HTTPS test) No

Couldn't resolve proxy 'MODULE_PAYMENT_PAYPAL_DP_PROXY' (Error No. 5)

 

I cannot find in /catalog/shopping_cart.php anything that remotely resembles this line:

<?php
 $initialize_checkout_methods = $payment_modules->checkout_initialization_method();

I have tried to search this topic (no easy task) for similar questions to no avail. Any tips or suggestions would be appreciated.

Share this post


Link to post
Share on other sites

The diagnostics file is design to be used after installation to make sure that everything was installed correctly. I've been meaning to create a new version that will do a server check to make sure that everything you need is installed.

 

If you're sure that cURL is installed, there shouldn't be a problem.


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.

Share this post


Link to post
Share on other sites

@jackcorbis: In the current version, it only adds a new comment with the details of the transaction. I've been considering having it update the order totals, however I'm not sure what the effect will be if someone is using the order editor contribution.


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.

Share this post


Link to post
Share on other sites

Thanks for getting back so fast. I sent a PP donation.

If you're sure that cURL is installed, there shouldn't be a problem.

 

Should I ignore this code addition??

I cannot find in /catalog/shopping_cart.php anything that remotely resembles this line:

<?php

$initialize_checkout_methods = $payment_modules->checkout_initialization_method();

Share this post


Link to post
Share on other sites
Thanks for getting back so fast. I sent a PP donation.

Should I ignore this code addition??

I cannot find in /catalog/shopping_cart.php anything that remotely resembles this line:

<?php

$initialize_checkout_methods = $payment_modules->checkout_initialization_method();

 

I believe that is from the RC2a update. not positive


-Dave

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×