Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Paypal Orders


copefan

Recommended Posts

Posted

Hi

 

I've just had a customer buy a product from shop..........and its our first Paypal

payment and it went through OK...........but the item was not listed in the orders section of the site and we only received the paypal e-mail and this did not have the product details on it just our shop name.

 

How can I get it to log the orders in the admin section just like the other forms of payment

 

Thanks Russ :o

 

www.skyray.info

Posted

do you have a section setup in the table order_status which shows paypal?

Posted

do you have a section setup in the table order_status which shows paypal?

 

also, from what i have been seeing, use paypay ipn.

 

on another note, the web site you have displayed under your name goes in your profile, not in the signature area. a board no no to have a web name displayed.

Posted

I am having this problem. I had a huge sale today and only half of the paypal orders showed up as orders in the store. This is a paperwork nightmare and I am dealing with a very limited stock. Has there been a fix beyond the lastest production release?

Posted

Hi

 

I've put the paypalipn_v0981_for_milestone_2 contribtion on and run it and everything is fine!

 

Cool............. :D

Posted

Hi!

 

I also want to use Paypal with my oscom2, I had the same problem... do you know where i can find the module Paypal IPN and how i can install it...

 

thanks a lot.

 

Alexy

Posted

If you have problems with IPN you can always use this code

 

You may also want to consider adding this in case they don't click continue on paypal site and return to your site to finish transaction

 

 

Just in case someone doesn't click continue to get back to your site

here is a mod to include into your PayPal module to you can see what the customer ordered on your PayPal payment notification (just in case they don't return to your site to complete the process and generate an invoice) -

 

BACK UP BACK UP BACK UP

 

change the following code:

 

function process_button() {

global $order, $currencies, $currency;

 

if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') {

$my_currency = $currency;

} else {

$my_currency = substr(MODULE_PAYMENT_PAYPAL_CURRENCY, 5);

}

if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) {

$my_currency = 'USD';

}

$xx = '';

for ($i=0; $i<sizeof($order->products); $i++) {

$xx .= $order->products[$i]['qty'] . '-' . ($order->products[$i]['name']) . '**';

}

$process_button_string = tep_draw_hidden_field('cmd', '_xclick') .

tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) .

tep_draw_hidden_field('item_name', STORE_NAME . ' ' . $xx) .

tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

tep_draw_hidden_field('currency_code', $my_currency) .

tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) .

tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

 

return $process_button_string;

}

 

 

the above code snippet replaces the code snippet in the catalog/includes/modules/payment/paypal.php file

 

look for

 

function process_button() {

 

and then copy and paste and replace that section of code with the code above

Posted

Can someone Help with this section of code. I am trying to insert a custom

field that should return the affiliates code to my paypal.cgi ipn file. I am unfamiliar

with PHP the line I am haveing the problem with is in the bold how should it read to call the variable $affiliate?

 

 

 

function process_button() {

global $order, $currencies, $currency;

 

if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') {

$my_currency = $currency;

} else {

$my_currency = substr(MODULE_PAYMENT_PAYPAL_CURRENCY, 5);

}

if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) {

$my_currency = 'USD';

}

 

 

// This php code will fetch the referring affiliate's username.

// It returns:

// $affiliate - the referring affiliate's username

 

// Make the database connection

$connection = mysql_connect("localhost","usernamexxx","xxxxx") or die ("Couldn't connect to the database");

$db2 = mysql_select_db("ufindsavings_com", $connection) or die ("Couldn't select database");

 

// Search for the cookie first

$affiliate = $HTTP_COOKIE_VARS["mycookie"];

 

// If no cookie, search for the IP address

if (!$affiliate) {

$ip = getenv("REMOTE_ADDR");

$sql="SELECT * FROM ua_hits WHERE Ip like '$ip'";

$sql_result = mysql_query($sql,$connection) or die ("Couldn't execute query");

while ($row = mysql_fetch_array($sql_result)) {

$affiliate = $row["Id"];

}}

 

$process_button_string = tep_draw_hidden_field('cmd', '_xclick') .

tep_draw_hidden_field('custom', $affiliate) .

tep_draw_hidden_field('business',

MODULE_PAYMENT_PAYPAL_ID) .

tep_draw_hidden_field('item_name', STORE_NAME) .

tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value

($my_currency), $currencies->get_decimal_places($my_currency))) .

tep_draw_hidden_field('image_url', 'https://www.mysitepicure.com/images/cart.gif') .

tep_draw_hidden_field('shipping', number_format($order-

>info['shipping_cost'] * $currencies->get_value($my_currency), $currencies-

>get_decimal_places($my_currency))) .

tep_draw_hidden_field('currency_code', $my_currency) .

tep_draw_hidden_field('return', tep_href_link

(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) .

tep_draw_hidden_field('cancel_return', tep_href_link

(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

 

 

return $process_button_string;

 

 

 

 

 

 

Thank You :)

Posted
If you have problems with IPN you can always use this code

 

You may also want to consider adding this in case they don't click continue on paypal site and return to your site to finish transaction

 

 

Just in case someone doesn't click continue to get back to your site

here is a mod to include into your PayPal module to you can see what the customer ordered on your PayPal payment notification (just in case they don't return to your site to complete the process and generate an invoice) -

 

BACK UP BACK UP BACK UP

 

change the following code:

 

function process_button() {

global $order, $currencies, $currency;

 

if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') {

$my_currency = $currency;

} else {

$my_currency = substr(MODULE_PAYMENT_PAYPAL_CURRENCY, 5);

}

if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) {

$my_currency = 'USD';

}

$xx = '';

for ($i=0; $i<sizeof($order->products); $i++) {

$xx .= $order->products[$i]['qty'] . '-' . ($order->products[$i]['name']) . '**';

}

$process_button_string = tep_draw_hidden_field('cmd', '_xclick') .

tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) .

tep_draw_hidden_field('item_name', STORE_NAME . ' ' . $xx) .

tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

tep_draw_hidden_field('currency_code', $my_currency) .

tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) .

tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

 

return $process_button_string;

}

 

 

the above code snippet replaces the code snippet in the catalog/includes/modules/payment/paypal.php file

 

look for

 

function process_button() {

 

and then copy and paste and replace that section of code with the code above

Are you saying that this code will work with regular paypal button or only with IPN?

 

If so, do you still recommend installing ipn

 

 

Thanks

Posted

Installing IPN will not require the above code to be used.

"Any fool can know. The point is to understand." -- Albert Einstein

Posted
Hi

 

I've put the paypalipn_v0981_for_milestone_2 contribtion on and run it and everything is fine!

 

Cool............. :D

Where I can find this "paypalipn_v0981_for_milestone_2" module?

 

could you provide me the link, thanks.

Archived

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

×
×
  • Create New...