Guest Posted May 27, 2009 Share Posted May 27, 2009 Has anyone gotten thisto work with PayPal_IPN 2.3.4.6 (http://addons.oscommerce.com/info/2679)? I have done the above, but it is still showing the full price when the customer goes to PayPal. Thanks!! I installed paypal 2.7 hay. I just added the following line in includes/modules/payment/paypal_ipn.php after all lines where $parameters['amount'] = .... $parameters['amount'] = $parameters['amount']-round($_SESSION['customer_shopping_points_spending'],2); Then set in Admin -- Modules for your paypal_ipn the option Transaction Type to: Aggregate For transactiontype: By Item i didnt found where i have to add the subtraction of the points yet. Paypaal is showing the price now correctly if you use points. i have a other problem with the POINTS Contrib :) by the way is a really good plug in. My Problem are following. If i pay with my paypal and points i come to the paypal side and click on back to Usershop then my points are updatet on my database. but i just want it to update after confirm the payment. i think that this #### Points/Rewards Module V2.1rc2a balance customer points BOF #### if ((USE_POINTS_SYSTEM == 'true') && (USE_REDEEM_SYSTEM == 'true')) { // customer pending points added if ($order->info['total'] > 0) { $points_toadd = get_points_toadd($order); $points_comment = 'TEXT_DEFAULT_COMMENT'; $points_type = 'SP'; if ((get_redemption_awards($customer_shopping_points_spending) == true) && ($points_toadd >0)) { tep_add_pending_points($customer_id, $insert_id, $points_toadd, $points_comment, $points_type); } } // customer referral points added if ((tep_session_is_registered('customer_referral')) && (tep_not_null(USE_REFERRAL_SYSTEM))) { $referral_twice_query = tep_db_query("select unique_id from " . TABLE_CUSTOMERS_POINTS_PENDING . " where orders_id = '". (int)$insert_id ."' and points_type = 'RF' limit 1"); if (!tep_db_num_rows($referral_twice_query)) { $points_toadd = USE_REFERRAL_SYSTEM; $points_comment = 'TEXT_DEFAULT_REFERRAL'; $points_type = 'RF'; tep_add_pending_points($customer_referral, $insert_id, $points_toadd, $points_comment, $points_type); } } // customer shoppping points account balanced if ($customer_shopping_points_spending) { tep_redeemed_points($customer_id, $insert_id, $customer_shopping_points_spending); } } #### Points/Rewards Module V2.1rc2a balance customer points EOF ####*/ have to be in a other Position in paypal_ipn.php Anyone fixed it? Lovely Greetz Said Almani Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted May 27, 2009 Share Posted May 27, 2009 its just started happening Has your ISP upgraded php from v4 to v5? Shop Admin >> Tools >> Server info Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
Guest Posted May 27, 2009 Share Posted May 27, 2009 Just reposting to see if anyone has seen the issue where you can't apply points and use another form of payment if you don't have enough points to pay for the entire order. Any help would definitely be appreciated. Quote Link to comment Share on other sites More sharing options...
ssnb Posted May 28, 2009 Share Posted May 28, 2009 i seem to have the contribution installed correctly although i am too having the issue with PayPal, the total is correct so all the points are calculating. the only problem i am having is that the points are not removed from the customer account after it is been used and the new points have not been added. now i can manually change the points in ADMIN but this can be a big job. when using bank deposit the points system is perfect. it is only having issues with PayPal standard. Any help or ideas would be great. i did try the code previously listed in the thread although i got errors when trying to add the points to the PayPal_standard.php files. i don't really need to have the points show in PayPal but i do need them to calculate on my site. Thanking you again. This is a recurring issue, unfortunately. Here is the reason it's not working. As I understand it, some payment methods (e.g. Paypal and some credit card processing companies) communicate the order payment amount to the payment engine first - the payment engine being on their site. Next, it updates your OSC store with the order - IF it was successful. In this regard, the payment engine tends to ignore checkout_process.php - which is where you will find your P&R code. Therefore, what you have to do is find a way to tell the payment engine (e.g. paypal) to process the points as long as the transaction was successful - when it updates your OSC store. Essentially, that is what the P&R code in checkout_process.php file does - which is why it works with bank transfer or any other static payment module you may use (like COD etc). There have been several people - way back in this forum (on pages 60 ish I think) who managed to develop the code so that it will work in Paypal IPN. When Paypal IPN processes a successful transaction, it updates P&R and adds the Points Redeemed bit to the order etc. For myself, I just upgraded from Paypal Payments Standard to Paypal IPN in order to make it work with P&R !! Perhaps a little extreme, but now it works fine with Paypal IPN! Unfortunately, I use a credit card processing company that do the same as Paypal Standard - and I have yet to find a fix for it myself - so I update those transactions manually which is a bit annoying. The alternative is to find a way to tell Paypal Standard how to do the above - maybe someone here has that code? If so would they please share it. Other than that, you could consider posting the job on www.elance.com for say $50 I'm sure you'll get it sorted. Cheers Solio Quote Link to comment Share on other sites More sharing options...
silkvixen Posted May 28, 2009 Share Posted May 28, 2009 Has your ISP upgraded php from v4 to v5? Shop Admin >> Tools >> Server info nope its still the same..... Database: MySQL 4.1.22-standard HTTP Server: Zeus/4.3 PHP Version: 4.4.9 (Zend: 1.3.0) so im at a loss *shrugs* Quote Link to comment Share on other sites More sharing options...
kintsuru Posted June 3, 2009 Share Posted June 3, 2009 Hiya Ben, How about the Japanese language files? I know not many other people have asked, but I sure could use them..... Dave @asatsuru.com Quote Link to comment Share on other sites More sharing options...
mousewebdesign Posted June 4, 2009 Share Posted June 4, 2009 Hi there, I don't know if this question has already been asked before, but I want to create a page called 'checkout_overview.php' between the shopping cart and the checkout_shipping page. Within this page I would like to show the items the customer wants to buy plus I want to let the customer choose to select his points on THIS page. Everything is working fine, but the main problem is, is that checkout_confirmation.php can't find the points discount because it is originally taken from the checkout_payment page which in my case is two pages later. Does anyone know how to get the information from checkout_overview to checkout_confirmation without using checkout_payment for this? Kind regards, Marcus Quote Link to comment Share on other sites More sharing options...
luvubeauty Posted June 6, 2009 Share Posted June 6, 2009 Hey! I just installed this mod and am pretty excited! I did notice however going through my test that any gift vouchure balance isn't showing in the checkout as it normally would? Did I mess up a code somewhere, has anyone else gone through this? Quote Link to comment Share on other sites More sharing options...
hose30 Posted June 8, 2009 Share Posted June 8, 2009 I am still having this same problem as quoated below Hi again. I am having problems and I really need to sort them to open up my store with points and rewards. Basically, there are no points being deducted from the order total on the checkout confirmation page and therefore the price is not being reduced nor the points deducted. I noticed the following from a page back... Notice the image shows the rewards module in the order totals module in the admin control. This does not appear here on my store, what could I have done wrong, is it a database thing? I believe this may be the cause, am I right and does anyone know the fix for this? Thanks... I need to know what file would be responsible for displaying the rewards module in the order total module section in admin control - as it is current not displayed there and I think this is the problem. I have gone back through the installation and cannot find any problems. Thanks again... Quote Link to comment Share on other sites More sharing options...
ssnb Posted June 8, 2009 Share Posted June 8, 2009 I am still having this same problem as quoated below I need to know what file would be responsible for displaying the rewards module in the order total module section in admin control - as it is current not displayed there and I think this is the problem. I have gone back through the installation and cannot find any problems. Thanks again... Without seeing your installation it's impossible to tell. If you think it could be a database thing, I would suggest you return to a previous working version, and try again. The files you are looking for are all in the package. My advice is to install the last release from Deep Silver (the author) as it seems the most stable. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 9, 2009 Share Posted June 9, 2009 Bug found.In a very rare case where full amount is covered by point and shipping tax and regular items tax are separated the order total is not rounded correctly and you will be returned to payment page asking you to choose payment method. to fix it open catalog/includes/languages/english/modules/order_total/ot_redemptions.php find this at line no.37 $order->info['total'] = $order->info['total'] - tep_calc_shopping_pvalue($customer_shopping_points_spending); and replace with this. $order->info['total'] = number_format($order->info['total'] - tep_calc_shopping_pvalue($customer_shopping_points_spending), 4); in a normal cases you won't see any different. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 11, 2009 Share Posted June 11, 2009 I am having the same problem also. Anyone figure it out yet? Thanks, Andrea I have had the same problem and cannot figure it out but do know that if you do not restrict points for minimum purchase amount it goes away. Novis that i am Quote Link to comment Share on other sites More sharing options...
Guest Posted June 11, 2009 Share Posted June 11, 2009 I found the solution to my problem by trial and error. What caused my problem was a bug in the minimum order value within the Points/Rewards configuration. Setting the value for it to nothing fixed it, but I wanted to use the minimum value, so the fix was to look at /includes/functions/redemptions.php - Look at line 336 and change it to read: global $cart, $currencies, $order; Thanks to the person that posted the above solutions to the minimum value bug. Thanyou again and again I have been going nuts tryiing, I am a novice and you guys are amazing thankyou. If any one can tell me now how to get around the check out when points are used to bring to zero without a payment method that would be great or is there another way. Quote Link to comment Share on other sites More sharing options...
silkvixen Posted June 15, 2009 Share Posted June 15, 2009 This is a recurring issue, unfortunately. Here is the reason it's not working. As I understand it, some payment methods (e.g. Paypal and some credit card processing companies) communicate the order payment amount to the payment engine first - the payment engine being on their site. Next, it updates your OSC store with the order - IF it was successful. In this regard, the payment engine tends to ignore checkout_process.php - which is where you will find your P&R code. Therefore, what you have to do is find a way to tell the payment engine (e.g. paypal) to process the points as long as the transaction was successful - when it updates your OSC store. Essentially, that is what the P&R code in checkout_process.php file does - which is why it works with bank transfer or any other static payment module you may use (like COD etc). There have been several people - way back in this forum (on pages 60 ish I think) who managed to develop the code so that it will work in Paypal IPN. When Paypal IPN processes a successful transaction, it updates P&R and adds the Points Redeemed bit to the order etc. For myself, I just upgraded from Paypal Payments Standard to Paypal IPN in order to make it work with P&R !! Perhaps a little extreme, but now it works fine with Paypal IPN! Unfortunately, I use a credit card processing company that do the same as Paypal Standard - and I have yet to find a fix for it myself - so I update those transactions manually which is a bit annoying. The alternative is to find a way to tell Paypal Standard how to do the above - maybe someone here has that code? If so would they please share it. Other than that, you could consider posting the job on www.elance.com for say $50 I'm sure you'll get it sorted. Cheers Solio Hi, I have paypal standard installed which im having all the same probs with having to add and delete the points manually. you mentioned that paypal IPN works with this contrib....how do you go about upgrading to that and do you have to change anything with your paypal account? thanks Quote Link to comment Share on other sites More sharing options...
bugcather Posted June 15, 2009 Share Posted June 15, 2009 Hello, In am looking for "POINTS AND REWARDS MODULE V2.00". Please. Where can I download that file?. Anybody can send them by email? (bugcather @ yahoo.es). Thanks Quote Link to comment Share on other sites More sharing options...
ssnb Posted June 15, 2009 Share Posted June 15, 2009 Hi,I have paypal standard installed which im having all the same probs with having to add and delete the points manually. you mentioned that paypal IPN works with this contrib....how do you go about upgrading to that and do you have to change anything with your paypal account? thanks It was a while ago that I upgraded, so can't remember how hard it was - you'll have to do the reading ! Here's some pointers: BACK UP FIRST ! http://www.oscommerce.com/forums/index.php?showtopic=179917 http://www.oscommerce.com/forums/index.php?showtopic=333691 Also, as mentioned in my last post, IPN ignores checkout_process.php, so any code that you may have added to checkout_process.php (from contributions such as the points & Rewards code) has to be added to IPN too. There are posts relevant to that issue a few pages back - but here's pone post - you'll have to double check it's the latest: http://www.oscommerce.com/forums/index.php?sho...p;#entry1329338 BACK UP FIRST ! Good luck Quote Link to comment Share on other sites More sharing options...
ssnb Posted June 15, 2009 Share Posted June 15, 2009 Hello, In am looking for "POINTS AND REWARDS MODULE V2.00". Please. Where can I download that file?. Anybody can send them by email? (bugcather @ yahoo.es). Thanks Why would you want an old version and why don't you actually bother to look at the contribution page first? http://addons.oscommerce.com/info/3220 Quote Link to comment Share on other sites More sharing options...
Platinum Games Posted June 20, 2009 Share Posted June 20, 2009 it would be nice if i could edit my posts, rather than post so many redundant replies :rolleyes: i believe i solved my problem! the code in includes/modules/payment/paypal_ipn.php was: #### Points/Rewards Module V2.00 balance customer points BOF #### if ((USE_POINTS_SYSTEM == 'true') && (USE_REDEEM_SYSTEM == 'true')) { // customer pending points added if (($order->info['total'] > 0) && (get_award_discounted($order) == true)) { $points_toadd = get_points_toadd($order); $points_comment = 'TEXT_DEFAULT_COMMENT'; $points_type = 'SP'; if ((get_redemption_awards($customer_shopping_points_spending) == true) && ($points_toadd >0)) { tep_add_pending_points($customer_id, $insert_id, $points_toadd, $points_comment, $points_type); } } // customer referral points added if ((tep_session_is_registered('customer_referral')) && (tep_not_null(USE_REFERRAL_SYSTEM))) { $points_toadd = USE_REFERRAL_SYSTEM; $points_comment = 'TEXT_DEFAULT_REFERRAL'; $points_type = 'RF'; tep_add_pending_points($customer_referral, $insert_id, $points_toadd, $points_comment, $points_type); } // customer shoppping points account balanced if ($customer_shopping_points_spending) { tep_redeemed_points($customer_id, $insert_id, $customer_shopping_points_spending); } } #### Points/Rewards Module V2.00 balance customer points EOF ####*/ i changed it to: #### Points/Rewards Module V2.1rc2a balance customer points BOF #### if ((USE_POINTS_SYSTEM == 'true') && (USE_REDEEM_SYSTEM == 'true')) { // customer pending points added if ($order->info['total'] > 0) { $points_toadd = get_points_toadd($order); $points_comment = 'TEXT_DEFAULT_COMMENT'; $points_type = 'SP'; if ((get_redemption_awards($customer_shopping_points_spending) == true) && ($points_toadd >0)) { tep_add_pending_points($customer_id, $insert_id, $points_toadd, $points_comment, $points_type); } } // customer referral points added if ((tep_session_is_registered('customer_referral')) && (tep_not_null(USE_REFERRAL_SYSTEM))) { $referral_twice_query = tep_db_query("select unique_id from " . TABLE_CUSTOMERS_POINTS_PENDING . " where orders_id = '". (int)$insert_id ."' and points_type = 'RF' limit 1"); if (!tep_db_num_rows($referral_twice_query)) { $points_toadd = USE_REFERRAL_SYSTEM; $points_comment = 'TEXT_DEFAULT_REFERRAL'; $points_type = 'RF'; tep_add_pending_points($customer_referral, $insert_id, $points_toadd, $points_comment, $points_type); } } // customer shoppping points account balanced if ($customer_shopping_points_spending) { tep_redeemed_points($customer_id, $insert_id, $customer_shopping_points_spending); } } #### Points/Rewards Module V2.1rc2a balance customer points EOF ####*/ and everything now works as it should. thank you again, deep-silver, for taking the time to release this update. :) can someone please advise where i have to place this code in the paypal_ipn.php file, i have been trying all different things all night and can not get it right. Quote Thanks in advance! Ben Link to comment Share on other sites More sharing options...
sharma.atul85 Posted June 22, 2009 Share Posted June 22, 2009 hii. I installed this mod everythings working fine except that the order total is not showing correct amount . what can be the problem ? also is there a way that I make customer to use either points or discount coupon ?? please reply fast ..I need it urgently. Quote Link to comment Share on other sites More sharing options...
chooch Posted June 22, 2009 Share Posted June 22, 2009 hii.I installed this mod everythings working fine except that the order total is not showing correct amount . what can be the problem ? also is there a way that I make customer to use either points or discount coupon ?? please reply fast ..I need it urgently. Have you tried to move the order settings in admin to see if you can make it work properly? Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. CHOOCH Link to comment Share on other sites More sharing options...
sharma.atul85 Posted June 22, 2009 Share Posted June 22, 2009 yes I have changed the order in admin as 0 for dis 1 for redm 2,3,4 for subtotal,tax etc and 6 for total but total displays incorrect value only if I select checkbox to add points in checkout_payment.php else it shows correct value Quote Link to comment Share on other sites More sharing options...
chooch Posted June 22, 2009 Share Posted June 22, 2009 yes I have changed the order in admin as0 for dis 1 for redm 2,3,4 for subtotal,tax etc and 6 for total but total displays incorrect value only if I select checkbox to add points in checkout_payment.php else it shows correct value It seems you set it up wrong! Explain exactly what you have for each module. So far I think you have this: #1 = points #2 #3 #4 = subtotal #5 = tax #6 = total How have you set it up? Copy my chart above to explain it. Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. CHOOCH Link to comment Share on other sites More sharing options...
sharma.atul85 Posted June 22, 2009 Share Posted June 22, 2009 here's my sort order: #0 = discount coupon --- = free gifts(empty) --- = low order(empty) #1 = sub-total #2 = shipping #3 = tax #4 = points redeem #5 = total Quote Link to comment Share on other sites More sharing options...
chooch Posted June 22, 2009 Share Posted June 22, 2009 here's my sort order: #0 = discount coupon --- = free gifts(empty) --- = low order(empty) #1 = sub-total #2 = shipping #3 = tax #4 = points redeem #5 = total Try this: #1 = sub-total #2 = shipping #3 = tax #4 = points redeem #5 = discount coupon #6 = total I am assuming the error occurs only when discount coupons have been applied.... If the order does not work then let me know which coupon contribution have you used, provide a link. Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. CHOOCH Link to comment Share on other sites More sharing options...
sharma.atul85 Posted June 22, 2009 Share Posted June 22, 2009 even this does not solve my problem here's page at checkout total price of products is $63.48 Sub-Total: $57.13 Per Item (Best Way): $0.05 Points Redeemed: -$2.12 Discount Coupon 1 applied: -$6.35 Total: $0.04 please check it here's the link of my site currently its on our server. http://prowebdesignsolutions.com/sulbha/ username: sharma.atul85@gmail.com password : asasas http://prowebdesignsolutions.com/sulbha/admin username : admin password : admin Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.