Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Paypal Module


Mark Evans

Recommended Posts

Hi All

 

I have just commited some changes to the standard paypal module.

 

The billing address details are now sent to paypal directly so the customer does not need to re-enter them.

 

I have also added the new auto return feature.

 

Remember to set the correct return page in your paypal account.

 

Any feedback is appreciated.

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

---------------------------------------

Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

I also tried checkout_success.php and it does the same thing. Also the product stays in the users shopping cart and never shows as being purchase as I don't receive an e-mail of their order.

I do however receive their PayPal payment. I just went ahead and went back in to my PayPal account and changed the IPN to just my domain name only (i.e. http://ByunMotorsports.com). It worked like that before and I only changed it to checkout_success.php because I heard that was the correct way to do it.

 

Anyways, how can we download the updated PayPal module?

Link to comment
Share on other sites

You need to return to checkout_process.php not checkout_sucess.php :)

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

---------------------------------------

Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

You can download the latest module from here

 

http://cvs.oscommerce.com/viewcvs.cgi/*che...al.php?rev=1.42

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

---------------------------------------

Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

Sparky,

 

The form action didn't get updated as suggested in the other thread, this means that when PayPal redirects them to the correct url the customer can easily change the price in the location bar.

 

Also the return url in the PayPal account profile doesn't have to be checkout_process.php since it is overriden by the return url specified by osC.

 

It is also possible to specify a url for the store's logo to appear on the PayPal website.

 

It is also possible to specify the page style name that the storeowner has configured in their PayPal account profile, which allows them to customize the PayPal payment page.

 

Incidentally, it is also possible to upload the entire contents of the shopping cart into PayPal's shopping cart so that it is itemized in their invoice too. The only current limitation of this is that PayPal only allows the specification of two attributes per product. However this could be worked around by concantenating them all into one field.

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

Link to comment
Share on other sites

The form action didn't get updated as suggested in the other thread, this means that when PayPal redirects them to the correct url the customer can easily change the price in the location bar.

 

Ok I will take a look

 

It is also possible to specify a url for the store's logo to appear on the PayPal website.

 

It is also possible to specify the page style name that the storeowner has configured in their PayPal account profile, which allows them to customize the PayPal payment page.

 

Ok I will take a look at these 2 items as well.

 

Incidentally, it is also possible to upload the entire contents of the shopping cart into PayPal's shopping cart so that it is itemized in their invoice too. The only current limitation of this is that PayPal only allows the specification of two attributes per product. However this could be worked around by concantenating them all into one field.

 

I did add this.. however when the details were sent to paypal a new screen appeared with a list of items and a checkout button.. This was very confusing... or is there another way of doing it?

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

---------------------------------------

Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

Not sure what you meant by a list of items, was this the contents of the osC shopping cart?

 

In order to use their Itemized Shopping Cart, the 'redirect_cmd' parameter needs to be changed, the code shown below determines whether Method 1 or 2 is being used and draws the product fields accordingly (this is configurable via the admin), in the below when method 1 (aggregate) is used the product names are concantenated into the 'item' field which isn't shown until the customer finalizes payment (which could be changed to the 'item_name' instead of the store_name:

 

Cart Costs

if(MODULE_PAYMENT_PAYPAL_METHOD == 2) { // Itemized Cart

$paypal_fields .= tep_draw_hidden_field('upload', sizeof($order->products) ) .
tep_draw_hidden_field('redirect_cmd', '_cart') .
tep_draw_hidden_field('handling_cart', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)));
//Let PayPal Calculate the amount since we're essentially uploading a shopping cart

} else { // Aggregate Cart (method 1)

$paypal_fields .= tep_draw_hidden_field('item_name', STORE_NAME) .
tep_draw_hidden_field('redirect_cmd', '_xclick') .
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)));

}

Products, the total amount for Itemized method 2 is (re)calculated by PayPal - everything needs to be to 2d.p.

if(MODULE_PAYMENT_PAYPAL_METHOD == 2) { // Itemized Cart
 //Customer Order Details
 for ($i=0; $i<sizeof($order->products); $i++) {
   $index = $i+1;
   $paypal_fields .= tep_draw_hidden_field('item_name_'.$index, $order->products[$i]['name']).
   tep_draw_hidden_field('item_number_'.$index, $order->products[$i]['model']).
   tep_draw_hidden_field('quantity_'.$index, $order->products[$i]['qty']).
   tep_draw_hidden_field('amount_'.$index, number_format($order->products[$i]['final_price']* $currencies->get_value($my_currency),2));

   //$paypal_fields .= tep_draw_hidden_field('tax_'.$index, number_format($order->info['tax'] * $currencies->get_value($my_currency),2));
   $taxValue = ($order->products[$i]['final_price'] * ($order->products[$i]['tax'] / 100)) * $currencies->get_value($my_currency);
   $paypal_fields .= tep_draw_hidden_field('tax_'.$index, number_format($taxValue, 2));


   //Customer Specified Product Options: PayPal Max = 2
   if ($order->products[$i]['attributes']) {
     for ($j=0, $n=sizeof($order->products[$i]['attributes']); $j<2; $j++) {
       if($order->products[$i]['attributes'][$j]['option']){
         $paypal_fields .= $this->_drawPayPalOptionSet($j,$index,$order->products[$i]['attributes'][$j]['option'],$order->products[$i]['attributes'][$j]['value']);
       } else {
         $paypal_fields .= $this->_drawPayPalOptionSet($j,$index,' ',' ');
       }
     }
   } else {
     for ($j=0; $j<2; $j++) {
       $paypal_fields .= $this->_drawPayPalOptionSet($j,$index,' ',' ');
     }
   }
 }
} else { // Aggregate Cart (method 1)
 $item_number;
 for ($i=0; $i<sizeof($order->products); $i++) {
   $item_number .= ' '.$order->products[$i]['name'].' ,';
 }
 $item_number = substr_replace($item_number,'',-1);
 $paypal_fields .= tep_draw_hidden_field('item_number', $item_number);
}

The following function is used in the above

function _drawPayPalOptionSet($sub_index,$index,$option=' ',$value=' ') {
 return tep_draw_hidden_field('on'.$sub_index.'_'.$index,$option).
   tep_draw_hidden_field('os'.$sub_index.'_'.$index,$value);
}

 

page_style name:

tep_draw_hidden_field('page_style',MODULE_PAYMENT_PAYPAL_PAGE_STYLE);

 

image url (should only really be used if the storeowner's site has SSL):

tep_draw_hidden_field('image_url', tep_href_link(DIR_WS_IMAGES.STORE_LOGO, '', 'SSL'));

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

Link to comment
Share on other sites

Ok thanks I will take another look into it.

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

---------------------------------------

Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

Note that inclusion of "return" in the PayPal button will over-ride the Auto-Return URL specified in the merchant's PayPal account Profile.

 

I'd suggest holding off on those other features until the core payment functionality is perfected (primarily, the use of IPN exclusively for payment information transmission).

 

Page style only needs to be specified if the merchant has multiple styles which is not too common.

 

The image_url is a nice feature but, as noted, there can be issues if it is not hosted from an https location.

 

Transmitting the cart details to PayPal is a nice feature but isn't strictly necessary in this situations since osC keeps track of the cart contents (the feature is provided for shopping cart systems that do not store the cart details).

Patrick Breitenbach

Link to comment
Share on other sites

I've installed the new module, but I get the following error message.

 

Fatal error: Call to a member function on a non-object in /var/www/oscommerce/includes/modules/payment/paypal.php on line 89

 

Line 89 is

 

tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $osC_Currencies->value($my_currency), $osC_Currencies->decimalPlaces($my_currency))) .

 

 

The entire block of code reads

 

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

        $my_currency = 'USD';

      }

      $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) .

                              tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $osC_Currencies->value($my_currency), $osC_Currencies->decimalPlaces($my_currency))) .

                              tep_draw_hidden_field('first_name', $order->billing['firstname']) .

                              tep_draw_hidden_field('last_name', $order->billing['lastname']) .

                              tep_draw_hidden_field('address1', $order->billing['street_address']) .

                              tep_draw_hidden_field('address2', $order->billing['suburb']) .

                              tep_draw_hidden_field('city', $order->billing['city']) .

                              tep_draw_hidden_field('state', $order->billing['state']) .

                              tep_draw_hidden_field('zip', $order->billing['postcode']) .

                              tep_draw_hidden_field('lc', $order->billing['country']['iso_code_2']) .

                              tep_draw_hidden_field('email', $order->customer['email_address']) .

                              tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $osC_Currencies->value($my_currency), $osC_Currencies->decimalPlaces($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('rm', '2') .

                              tep_draw_hidden_field('no_note', '1') .

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

 

      return $process_button_string;

    }

 

Any thoughts?

Confused worm farmer looking for assistance.

Link to comment
Share on other sites

I take it you are using MS-2?

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

---------------------------------------

Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

Ok then it should be easy :)

 

Just replace all instances of

 

$osC_Currencies

 

with

 

$currencies

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

---------------------------------------

Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

Ok replaced all, but now I receive this error message

 

Fatal error: Call to undefined function: value() in /var/www/oscommerce/includes/modules/payment/paypal.php on line 89

 

 

 

Here is line 89

 

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

Confused worm farmer looking for assistance.

Link to comment
Share on other sites

  • 2 weeks later...

Having debugged this to work with 2.2 MS2 (by comparing it to the original paypal.phpfile :

changes you need to make are :

 

change $osC_Currencies to $currencies - all instances

change value() to get_value() - in the amount and shipping fields

change decimalplaces to get_decimal_places - in the amount and shipping fields

change $osC_Session to $session - all instances

add $currency to the global variables list. - just the once :)

 

its the value and decimalplaces which cause the unknown function errors.

 

Here is the code from my working file, if you use this, be aware I have changed

the $my_currency='USD'; line to $my_currency='GBP';

 

function process_button() {
     global $session, $order, $currency, $currencies;

     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 = 'GBP';
     }
     $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) .
                              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('first_name', $order->billing['firstname']) .
                              tep_draw_hidden_field('last_name', $order->billing['lastname']) .
                              tep_draw_hidden_field('address1', $order->billing['street_address']) .
                              tep_draw_hidden_field('address2', $order->billing['suburb']) .
                              tep_draw_hidden_field('city', $order->billing['city']) .
                              tep_draw_hidden_field('state', $order->billing['state']) .
                              tep_draw_hidden_field('zip', $order->billing['postcode']) .
                              tep_draw_hidden_field('lc', $order->billing['country']['iso_code_2']) .
                              tep_draw_hidden_field('email', $order->customer['email_address']) .
                              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('rm', '2') .
                              tep_draw_hidden_field('no_note', '1') .
                              tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

     return $process_button_string;
   }

Link to comment
Share on other sites

So it's now working with MS2 but the IPN still doesn't work...

 

Have setup my paypal ipn to return to checkout_process.php

 

The customer still needs to hit the continue button for the order to be placed in the database.

 

 

Btw,

You can now enable an auto return with paypal, so if this was set to checkout_process it would automatically bounce back to the osc site one the payment had been completed. Only problem is their requirements for the following to appear on the sucess page

 

Example :

Your payment has been processed and you will receive a reciept via email shortly. You can log into your account at www.paypal.com to see the details

 

I can just go in and add a text line which gives this info but it would appear for all payment methods, and i cant spot how to determine which payment process was used in checkout_sucess to write an if statment in the language file.

 

keep up the good work though :)

 

Mel

Link to comment
Share on other sites

  • 7 months later...
Hi All

 

I have just commited some changes to the standard paypal module.

 

The billing address details are now sent to paypal directly so the customer does not need to re-enter them.

 

I have also added the new auto return feature.

 

Remember to set the correct return page in your paypal account.

 

Any feedback is appreciated.

 

 

Is there anything especial I need to setup to get the customer address to transfer to Paypal to avoid double entry?

 

I had the latest Payapl module but when I take a look to customer order details on paypal nonen of them have the customer address.

 

Why?

 

Any help will be appreciated.

 

Thanks

Link to comment
Share on other sites

  • 1 year later...
Not sure what you meant by a list of items, was this the contents of the osC shopping cart?

 

In order to use their Itemized Shopping Cart, the 'redirect_cmd' parameter needs to be changed, the code shown below determines whether Method 1 or 2 is being used and draws the product fields accordingly (this is configurable via the admin), in the below when method 1 (aggregate) is used the product names are concantenated into the 'item' field which isn't shown until the customer finalizes payment (which could be changed to the 'item_name' instead of the store_name:

 

Cart Costs

if(MODULE_PAYMENT_PAYPAL_METHOD == 2) { // Itemized Cart

$paypal_fields .= tep_draw_hidden_field('upload', sizeof($order->products) ) .
tep_draw_hidden_field('redirect_cmd', '_cart') .
tep_draw_hidden_field('handling_cart', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)));
//Let PayPal Calculate the amount since we're essentially uploading a shopping cart

} else { // Aggregate Cart (method 1)

$paypal_fields .= tep_draw_hidden_field('item_name', STORE_NAME) .
tep_draw_hidden_field('redirect_cmd', '_xclick') .
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)));

}

Products, the total amount for Itemized method 2 is (re)calculated by PayPal - everything needs to be to 2d.p.

if(MODULE_PAYMENT_PAYPAL_METHOD == 2) { // Itemized Cart
?//Customer Order Details
?for ($i=0; $i<sizeof($order->products); $i++) {
? ?$index = $i+1;
? ?$paypal_fields .= tep_draw_hidden_field('item_name_'.$index, $order->products[$i]['name']).
? ?tep_draw_hidden_field('item_number_'.$index, $order->products[$i]['model']).
? ?tep_draw_hidden_field('quantity_'.$index, $order->products[$i]['qty']).
? ?tep_draw_hidden_field('amount_'.$index, number_format($order->products[$i]['final_price']* $currencies->get_value($my_currency),2));

? ?//$paypal_fields .= tep_draw_hidden_field('tax_'.$index, number_format($order->info['tax'] * $currencies->get_value($my_currency),2));
? ?$taxValue = ($order->products[$i]['final_price'] * ($order->products[$i]['tax'] / 100)) * $currencies->get_value($my_currency);
? ?$paypal_fields .= tep_draw_hidden_field('tax_'.$index, number_format($taxValue, 2));
? ?//Customer Specified Product Options: PayPal Max = 2
? ?if ($order->products[$i]['attributes']) {
? ? ?for ($j=0, $n=sizeof($order->products[$i]['attributes']); $j<2; $j++) {
? ? ? ?if($order->products[$i]['attributes'][$j]['option']){
? ? ? ? ?$paypal_fields .= $this->_drawPayPalOptionSet($j,$index,$order->products[$i]['attributes'][$j]['option'],$order->products[$i]['attributes'][$j]['value']);
? ? ? ?} else {
? ? ? ? ?$paypal_fields .= $this->_drawPayPalOptionSet($j,$index,' ',' ');
? ? ? ?}
? ? ?}
? ?} else {
? ? ?for ($j=0; $j<2; $j++) {
? ? ? ?$paypal_fields .= $this->_drawPayPalOptionSet($j,$index,' ',' ');
? ? ?}
? ?}
?}
} else { // Aggregate Cart (method 1)
?$item_number;
?for ($i=0; $i<sizeof($order->products); $i++) {
? ?$item_number .= ' '.$order->products[$i]['name'].' ,';
?}
?$item_number = substr_replace($item_number,'',-1);
?$paypal_fields .= tep_draw_hidden_field('item_number', $item_number);
}

The following function is used in the above

function _drawPayPalOptionSet($sub_index,$index,$option=' ',$value=' ') {
?return tep_draw_hidden_field('on'.$sub_index.'_'.$index,$option).
? ?tep_draw_hidden_field('os'.$sub_index.'_'.$index,$value);
}

 

page_style name:

tep_draw_hidden_field('page_style',MODULE_PAYMENT_PAYPAL_PAGE_STYLE);

 

image url (should only really be used if the storeowner's site has SSL):

tep_draw_hidden_field('image_url', tep_href_link(DIR_WS_IMAGES.STORE_LOGO, '', 'SSL'));

Link to comment
Share on other sites

Not sure what you meant by a list of items, was this the contents of the osC shopping cart?

 

In order to use their Itemized Shopping Cart, the 'redirect_cmd' parameter needs to be changed, the code shown below determines whether Method 1 or 2 is being used and draws the product fields accordingly (this is configurable via the admin), in the below when method 1 (aggregate) is used the product names are concantenated into the 'item' field which isn't shown until the customer finalizes payment (which could be changed to the 'item_name' instead of the store_name:

 

Cart Costs

if(MODULE_PAYMENT_PAYPAL_METHOD == 2) { // Itemized Cart

$paypal_fields .= tep_draw_hidden_field('upload', sizeof($order->products) ) .
tep_draw_hidden_field('redirect_cmd', '_cart') .
tep_draw_hidden_field('handling_cart', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)));
//Let PayPal Calculate the amount since we're essentially uploading a shopping cart

} else { // Aggregate Cart (method 1)

$paypal_fields .= tep_draw_hidden_field('item_name', STORE_NAME) .
tep_draw_hidden_field('redirect_cmd', '_xclick') .
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)));

}

Products, the total amount for Itemized method 2 is (re)calculated by PayPal - everything needs to be to 2d.p.

if(MODULE_PAYMENT_PAYPAL_METHOD == 2) { // Itemized Cart
?//Customer Order Details
?for ($i=0; $i<sizeof($order->products); $i++) {
? ?$index = $i+1;
? ?$paypal_fields .= tep_draw_hidden_field('item_name_'.$index, $order->products[$i]['name']).
? ?tep_draw_hidden_field('item_number_'.$index, $order->products[$i]['model']).
? ?tep_draw_hidden_field('quantity_'.$index, $order->products[$i]['qty']).
? ?tep_draw_hidden_field('amount_'.$index, number_format($order->products[$i]['final_price']* $currencies->get_value($my_currency),2));

? ?//$paypal_fields .= tep_draw_hidden_field('tax_'.$index, number_format($order->info['tax'] * $currencies->get_value($my_currency),2));
? ?$taxValue = ($order->products[$i]['final_price'] * ($order->products[$i]['tax'] / 100)) * $currencies->get_value($my_currency);
? ?$paypal_fields .= tep_draw_hidden_field('tax_'.$index, number_format($taxValue, 2));
? ?//Customer Specified Product Options: PayPal Max = 2
? ?if ($order->products[$i]['attributes']) {
? ? ?for ($j=0, $n=sizeof($order->products[$i]['attributes']); $j<2; $j++) {
? ? ? ?if($order->products[$i]['attributes'][$j]['option']){
? ? ? ? ?$paypal_fields .= $this->_drawPayPalOptionSet($j,$index,$order->products[$i]['attributes'][$j]['option'],$order->products[$i]['attributes'][$j]['value']);
? ? ? ?} else {
? ? ? ? ?$paypal_fields .= $this->_drawPayPalOptionSet($j,$index,' ',' ');
? ? ? ?}
? ? ?}
? ?} else {
? ? ?for ($j=0; $j<2; $j++) {
? ? ? ?$paypal_fields .= $this->_drawPayPalOptionSet($j,$index,' ',' ');
? ? ?}
? ?}
?}
} else { // Aggregate Cart (method 1)
?$item_number;
?for ($i=0; $i<sizeof($order->products); $i++) {
? ?$item_number .= ' '.$order->products[$i]['name'].' ,';
?}
?$item_number = substr_replace($item_number,'',-1);
?$paypal_fields .= tep_draw_hidden_field('item_number', $item_number);
}

The following function is used in the above

function _drawPayPalOptionSet($sub_index,$index,$option=' ',$value=' ') {
?return tep_draw_hidden_field('on'.$sub_index.'_'.$index,$option).
? ?tep_draw_hidden_field('os'.$sub_index.'_'.$index,$value);
}

 

page_style name:

tep_draw_hidden_field('page_style',MODULE_PAYMENT_PAYPAL_PAGE_STYLE);

 

image url (should only really be used if the storeowner's site has SSL):

tep_draw_hidden_field('image_url', tep_href_link(DIR_WS_IMAGES.STORE_LOGO, '', 'SSL'));

Link to comment
Share on other sites

Not sue how old this is or if were answered in another post but I am new to OSC and am having and issue with PayPal IPN and use of aggregate/per item Transaction Type and a quantity discount. If I set it to aggregate, I get succes with discount but papal doesn't show the product attributes (large/xl and/or white/black), just t-shirt (name of product). If I change it to per item, when paypal takes over, you can view the cart and get specific detils but the discount is not included (customer pays full price). I can't seem to have both options work at the same time. The db is populated with the info fine.

Any ideas?

Thanks for any advice!

Chad

[email protected]

Link to comment
Share on other sites

  • 1 year later...

Hi

I have an issue with this Paypal module,

 

it all works fine you add your products checkout - go to paypal site it states the total you need to pay then it sends an email saying they have paid however it doesnt add the payment to the orders screen so you dont know what they bought?

 

please can someone help ASAP this site is about to go live! :'(

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

Hi,

 

I am very new to oscommerce.

 

I wish to use Website Payment Standard of PayPal for my online store. However, when I install it, I see that it's currency selection does not take SGD (Singapore Dollar). May I know this module you worked on supports the Website Payment Standard? Do you have links to instructions on how I suppose to install this PayPal module so that I can start using my site?

 

Thank you so much for your help.

 

Chee Beng, ANG.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...