Jump to content

Ian-San

Members
  • Content count

    761
  • Joined

  • Last visited

Everything posted by Ian-San

  1. Ok I have answered my own question. PayPal sends two responses for a Refund: The first: payment_status = Completed txn_type = reversal The second: payment_status = Refunded txn_type = web_accept See here: http://www.paypaldev.org/topic.asp?TOPIC_ID=4394 so to stop the re-processing of the order, you need to add: && ($txn_type != 'reversal') to the if in paypal_notify.php. I have combined it all together like this: if ( ($notify_customer_id > '0') && ($response_verified == '1') && ($payment_status == 'Completed') && ($txn_type != 'reversal') ) { However, you will not see txn_type = reversal in the database as this is instantly replaced by the second PayPal response which will show txn_type = web_accept.
  2. I installed this on MS1 - it works fine. It is a great mod and to be recommended. One minor error was the (int) in: tep_db_query("delete from " . TABLE_PAYPALIPN_TXN . " where txn_id = '" . (int)$paypalipn_txn_id . "'"); in admin/paypalipn_txt.php. $paypalipn_txn_id is alphanumeric so the (int) should be deleted. Plus I also added 'Refunded' to the list of response options. I also set the mailto in paypal_notify.php back to the original and just made the default sendto address as option 1 to retain the address formating. ie. $email_order .= "\n" . EMAIL_TEXT_PAYPAL_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($notify_customer_id, '1', 0, '', "\n") . "\n\n"; EMAIL_TEXT_PAYPAL_ADDRESS just says ' Customer Address'. It is not a problem to me that customers may have different billing and delivery addresses as this is just the email confirmation. They can always check these details in their Account Order History. So, everything works fine in test and on real transations except for a refund. For a Refund, the PayPal response processes the order again - even though in tests this seems impossible - and the status of the order is actually updated to Refunded. My conclusion is that the PayPal response is using a cached version of paypal_notify.php or actioning the order on the first pass using variables stored with the Cid before it updates the order status in MySQL. Has anyone come across this problem?
  3. Ian-San

    Worldpay support III

    On the face of it, I would say it is a file system permission problem - is your php setup for safe mode and so maybe cannot open the application_top file?
  4. Ian-San

    Worldpay support III

    As you say, localhost is the problem. Your page does not exist on the WP server (which is what using localhost implies) so you need to make sure that the callback is to a real, full, URL. WP probably do not allow callbacks to IP addresses either for security reasons (but not sure about this).
  5. Ian-San

    Worldpay support III

    Correct - but I don't think you can make the change as https should not allow automatic access in the way the currency update script currently works. The answer (for me at least) was to ask WP to add all my display currencies to my installation (which they did free of charge) and so the WP currency conversion is no longer required (as the displayed currency price is now used in WP without conversion).
  6. Ian-San

    Worldpay support III

    Shouldnt be too difficult as the transId is already passed back to OSC in the WP success string. So in wpcallback.php, you would just need to find it and store it: if(isset($transId) ) { STORE $transId IN A TABLE SOMEWHERE } You would need to create a new field in the database to store it and have some way to check what it is in Admin. }
  7. Ian-San

    Worldpay support III

    It shouldnt be too difficult as all the WP part will work as will the callback pages. The only problem would be that a few variables would show up as null or you will get errors reported from the main worldpay.php file. If you can, I would just load it and see what errors you get.
  8. Ian-San

    Worldpay support III

    I dont think that these changes by Worldpay should affect the way release 3c works but release 3c was never 'legal' due to the auto-redirect technology that it uses. It really just worked as WorldPay did not, at that time, have any way to uphold their own rules. So it is possible that WP have now made the changes to their system to stop auto-redirects working. Lets see the error messages when they are posted. I agree with scottymcloo, there is not much point trying to make changes to old versions - it is much better that you either upgrade to MS1 or try to de-engineer the MS1 release to make it work with earlier versions.
  9. Ian-San

    Worldpay support III

    Any more details? What sort of upgrade? What actually happens? What do you see on screen? :shock: I wonder, more chance to win the lottery I think!! :twisted:
  10. Ian-San

    Worldpay Support

    Yep - defintely off topic! No doubt someone is now going to ask how its done - so to avoid cluttering up this thread anymore with this subject, here is the answer: Copy the shadow images under the boxes from my site - left and right. Add to the each info box like this (noting left and right images): new infoBox($info_box_contents); echo tep_image(DIR_WS_IMAGES . 'shadow_l.gif'); // shadow_r.gif for right side. ?> </td> </tr> <!-- information_eof //-->
  11. Ian-San

    Worldpay Support

    In a word no. Not sure how you would be able to tell which site was calling the WP module so as to associate the right account number anyway?
  12. Ian-San

    Worldpay Support

    This code snippet is fundamentally flawed as it will always select the option to put the ? in as it will never find the osCsid in the string. Not that this will concern most users as nearly everyone seems to be working with cookies enabled. A better test would be to check if cookies are on or off. True but OSC does care and the idea developed in an earlier thread was to pass the CID back through the callback. Again, most people do not care as most are using cookies. Whether it is STILL necessary to pass the CID back in this was is a mute point. Not sure about this, example 2 above with the 2 ? shows that there is. Or have I misunderstood? On return to the store, only default parameters are used (as you are really running a copy of the store within the WP window) so it will display the default language. By passing the language parameter back like this you can force the language of choice for the user. It seems okay to me??
  13. Ian-San

    Worldpay Support

    Modify catalog/includes/application_top.php instead - after a certain date, filename defines were moved to filenames.php.
  14. Ian-San

    Worldpay Support

    Well, assuming that you are using a clean copy of OSC, then my suggestion would be to start by putting the images into the conditions file like this: Find catalog/includes/languages/english/conditions.php Look for: define('TEXT_INFORMATION', 'Put here your Conditions of Use information.'); And paste the above code in say like this: define('TEXT_INFORMATION', ' We accept the following credit cards:<br><center> <script language="JavaScript" src="http://www.worldpay.com/cgenerator/cgenerator.php?instId=' . MODULE_PAYMENT_WORLDPAY_ID . '"></script></center> ');
  15. Ian-San

    Worldpay Support

    This works for me: <script language="JavaScript" src="http://www.worldpay.com/cgenerator/cgenerator.php?instId=' . MODULE_PAYMENT_WORLDPAY_ID . '"></script>
  16. Ian-San

    OSC-Affiliate

    Ooops! I think I meant to say: $affiliate_sales_split = new splitPageResults($affiliate_sales_raw, MAX_DISPLAY_SEARCH_RESULTS); but dont count on it working - hard to do this without actually having MS2 installed!
  17. Ian-San

    OSC-Affiliate

    On the face of it, you just need to change line 36 to: $affiliate_sales_split = new splitPageResults($affiliate_sales_raw, $HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS); but as I said, I am not using MS2 and cannot test this.
  18. Ian-San

    Worldpay Support

    :shock: Your catalog is way too old or alternatively your WP mod is way too new.
  19. Ian-San

    OSC-Affiliate

    I am not using this but looking at your problem, I would say it is caused by the recent changes to the splitPageResults class. Just out of interest, try commenting out line 36 of affiliate_sales.php. Maybe nothing to do with this but you never know!
  20. Ian-San

    Worldpay Support

    Where does it go? Do you see the WP banner or do you see the wpcallback file included in the contribution?
  21. Ian-San

    Worldpay Support

    Just make sure that you enter your Worldpay Installation ID in Admin, enable the module plus enter the callback info in WP Configuration manager - http://<wpdisplay item="MC_callback"> - see installation instructions in MS1 version - and you should have no problem. (If not using the MS1 version of the WP mod dont do this). Good luck :)
  22. Ian-San

    Worldpay Support

    Providing you have put the right files in catalog/includes/modules/payment and catalog/includes/languages/english/modules/payment and are using MS1 or before, you should see 'Secure Credit Card Payment' in Admin. If you do not, then it might be because you have changed something such as the class name - so check that everything important says 'worldpay' in lower case. e.g. class worldpay $this->code = 'worldpay'; etc.
  23. Ian-San

    OSC-Affiliate

    Maybe: $affiliate_conversions = tep_round(($affiliate_sales['count'] * 100) / $affiliate_clickthroughs, 2); ????
  24. Ian-San

    OSC-Affiliate

    Thats a very neat solution and you save me 2 months of effort! Many thanks :D
  25. Ian-San

    Worldpay Support

    That may be true but if you ask WP, they still recommend that you use version 3c of this mod which works entirely on auto-redirects. They explained it to me that they have the condition to a) prevent redirects to sites OTHER than the origin and B) to allow the user to read their banner. The MS1 version of the WP mod meets both those conditions.
×