Jump to content

cinolas

Members
  • Content count

    282
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by cinolas

  1. cinolas

    Moneris, eSelect plus

    @greasemonkey When you made the Moneris module for Phoenix, did you update it to use the new Moneris API? Or did you simply convert the process that was in the 2.2 / 2.3.x module? Moneris is saying that the 2.3.x module uses their old API (& 3dSecure 1.0) which is barely still supported by card issuers. I need to change this so it uses the new APIs...
  2. cinolas

    Moneris, eSelect plus

    My problem is not fixed.... it seems the one thing it's really doing wrong is that it's keeping failed AVS transactions in PRE-AUTH. Then the customer tries a few times, it locks up their available balance in the mutiple PRE-AUTH and then we get angry customers.
  3. cinolas

    Moneris, eSelect plus

    I'm not sure wether that's what was causing my problem or not, I'm not sure yet that it's fixed, but the format for the AVS response codes field is like "AWXYZ", no spaces, no commas. My selection of codes was a little wrong too.
  4. cinolas

    Moneris, eSelect plus

    New problems with this module while AVS check is enabled (still on osC 2.3.4 BS GOLD). @greasemonkey have you see this before? I just activated AVS check because we were getting a lot more fraud than before. In an effort not to stop orders coming in from Quebec (where addresses often contain accents) I’ve elected to accept the following AVS verification codes: A, W, X, Y, Z. I did some testing and everything seemed to be working reliably. Looking at our logs this morning it’s apparent that there’s a problem. Some transactions are being approved without the AVS check while others are being declined because of a bad AVS check. Some are approved with bad CVD while others are declined, and some not checked at all. Some of the payments that came in without an order were in Pre-Auth even though the options sate to Complete the transaction. Even worst, some transactions are being approved but osCommerce isn’t getting the response and isn’t creating an order and the only sign we get of the payment being received is in our local Moneris transaction log. It worked pretty flawlessly when I had AVS disabled. The options hereunder were the same except that the AVS response field was left blank, and the "How would you like to perform CVD verification?" option was set to "Allow Unparticipated Cards". Here's my AVS enabled configuration: Enable Moneris Solutions eSELECTplus Module Do you want to accept eSELECTplus payments?X True FalseEnvironmentTest or Production Server? Test ServerX Production ServerTransaction CompletionComplete transaction on checkout or manual completion X Completion on checkout Manual CompletionStore IDStore ID value obtained from the Moneris eSELECTplus Activation Letter MYSTOREIDAPI TokenAPI Token value obtained from the Store Settings Section of eSELECTPlus Merchant Resource Center MYAPITOKENOrder ID PrefixPrefix of the order id you would like on for the moneris transactions OSC_ORDER-Number Of RetriesNumber of Retries on the same credit card in the same transaction.(To disable retries limit, set it as '-1') 10VISA Card TransactionsHow would you like to perform VISA card transaction(s)? Do not accept Normal Transaction onlyX Perform AVS/CVD Perform VbV Perform VbV and AVS/CVDMaster Card TransactionsHow would you like to perform Master Card transaction(s)? Do not accept Normal Transaction onlyX Perform AVS/CVD Perform MCSC Perform MCSC and AVS/CVDAmerican Express TransactionsHow would you like to perform American Express transaction(s)?X Do not accept Normal Transaction only Perform CVDNovus/Discover TransactionsHow would you like to perform Novus/Discover transaction(s)?X Do not accept Normal Transaction only Perform AVSOther Card Types TransactionsWould you like to allow transaction(s) from other card types?X Do not accept Normal Transaction onlyCard Verification Digit (CVD)How would you like to perform CVD verification? Do Not PerformX Full Matches Only Allow Unparticipated CardsAddress Verification Service (AVS)Which AVS response code would you allow? (To disable AVS, leave the field blank) A, W, X, Y, Z Add Shipping TaxWould you like to turn the module to calculate shipping tax? YesX NoPayment ZoneIf a zone is selected, only enable this payment method for that zone. NoneSort order of display.Sort order of display. Lowest is displayed first. 0Set Order StatusSet the status of orders made with this payment module to this value default
  5. Never mind got it: I.IP.SURF,I.SP.SURF No space....
  6. @greasemonkey I'm having the same problem with the CanadaPost module not accepting the disallowed services, and storing 'array' in the DB instead.... I don't mind entering the disallowed services into the DB manually (unless there's an easy fix) but I can't figure out the proper format for the multiple choices. Specifically I entered those 2 services I need to disallow: I.IP.SURF, I.SP.SURF But when I look at the web interface it only seems to recognize Small Packet International Surface and not I.I P.SURF as "International Parcel Surface". Maybe it's not the format but the code... Is there a different code for that service now? Cheers!
  7. If someone feels competent enough in PHP and osC to troubleshoot this one for me / with me, I am willing to pay.
  8. I'm using osC 2.3.4 BS GOLD with a modified version of the Gift Voucher add on. I just finished installing and customizing the Gift Voucher add-on for what I need it to do, and there's obviously something wrong in the modifications I did: the credit card number gets blanked out between the payment and confirmation page when I'm checking out with my CC payment method (Moneris). It's definitely something I changed on the checkout_payment or checkout_confirmation page, or related payment and order total classes. The CC info is being passed by the post but is not being added to the order object, a vardump shows: array(85) { ["_GET"]=> &array(0) { } ["_POST"]=> &array(10) { ["formid"]=> string(32) "5b219c15c93cb4e93f07353410eec71c" ["payment"]=> string(12) "moneriscampg" ["campg_cc_name"]=> string(15) "Nicolas Charest" ["campg_cc_number"]=> string(16) "47890111##########" (# removed, but it was correct) ["campg_cc_expires_month"]=> string(2) "01" ["campg_cc_expires_year"]=> string(2) "##" (# removed, but it was correct) ["campg_cvd"]=> string(3) "###" (# removed, but it was correct) ["cot_gv"]=> string(1) "0" ["gv_redeem_code"]=> string(0) "" But not in the order object: ["order"]=> object(order)#20 (7) { ["info"]=> array(15) { ["order_status"]=> string(1) "6" ["currency"]=> string(3) "CAD" ["currency_value"]=> string(10) "1.00000000" ["payment_method"]=> string(30) "Visa, MasterCard or Visa Debit" ["cc_type"]=> string(0) "" ["cc_owner"]=> string(0) "" ["cc_number"]=> string(0) "" ["cc_expires"]=> string(0) "" How can I troubleshoot this issue? I'm a total hack at php... where in the process do those variables get set? how can I trace them to see when they get reset? My php error log only logs an error in the Moneris payment module because the cc# is empty. Any help is greatly appreciated. Cheers!
  9. Thanks @Jack_mcs I did not know of this function, looks promising.
  10. cinolas

    Gift Vouchers Secure

    @Jack_mcs I'm back! <sigh> I know that what I'm doing with Gift Voucher is FAR beyond regular support, but I'm having one last problem and I'm hoping you may have insights: After all the modifications I've done, when I try checking out with my regular CC payment method (Moneris) no Gift Voucher involved, the CC#, CC Expiration, and CVS gets blanked out as described here: Thanks!
  11. cinolas

    Gift Vouchers Secure

    @Jack_mcs I think I may have figured out a better way. The idea was to remove the redeem field from the payment page so that "Guests" (from the PWA guest checkout contrib) can't redeem gift vouchers. I'm going to use javascript to hide the field instead.
  12. cinolas

    Gift Vouchers Secure

    @Jack_mcs I'm going to bug you once more, about something that is far, FAR, beyond the scope of support I'm trying to move the gift voucher code redeem field. I don't want it on checkout_payment.php but on a page of it's own (redeem_gv.php) accessed from My Account. Is that a customization that I could hire you to do? PM me. I looked into it, and it looks like I would have to split the credit_selection() function into 2 different functions, one for the checkbox, one for the redeem code field. And then somehow build a form on redeem_gv.php that stands alone and calls the order_total classes. I just need a field to type in the gv code, and then run the verification and add the amount to the user's account. It sounds simple, but I'm not sure I can manage that myself in a timely manner. The reason is that Gift Voucher doesn't work well with Pay Without Account (obviously, since the balance must be stored in the user's account), I've modified account_pwa.php to prevent guest checkout when there's a gift voucher in the cart. If I can move the redeem process to a page accessed from My Account then I believe that covers me and guest users won't be able to buy or redeem gift vouchers. Let me know!
  13. I'm using osC 2.34 BS GOLD and I'm customizing a Gift Voucher contrib along with a Free payment module. Everything is in place and working well but osC refuses to let me checkout when the order total = $0. I get to checkout_confirmation.php, click Confirm Order and I'm sent back to checkout_payment.php with the message: I'm told this is normal behaviour for osCommerce, and is part of core code that needs to be changed. But I also suspect that the Free payment module I'm using may be a bit outdated, and so may be missing something. Debugging this led me to line 90 of checkout_process.php where this IF sends me back to checkout_payment.php with the error: if ( ($payment_modules->selected_module != $payment) || ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL')); } Specifically this part returns TRUE: !is_object($$payment) The Free payment module I'm using has a code of "free". $payment = 'free' so $$payment = $free, and if I put a var_dump on checkout_confirmation.php I see: ["free"]=> object(free)#19 (5) { ["code"]=> string(4) "free" ["title"]=> string(36) "Pay with my Gift Certificate balance" ["description"]=> string(12) "Free Product" ["enabled"]=> bool(true) ["sort_order"]=> string(1) "1" } It looks like an object to me. But I admittedly don't know much about php objects... So why is !is_object($$payment) returning TRUE? Could the $$ nomenclature not be working? Is there a way to test that? Or maybe I'm going at this the wrong way? How can allow checkout when the total = $0? Any clues are greatly appreciated. Thanks!
  14. cinolas

    Checkout when order total is $0

    I'm not entirely following you here @ecartz This line: if (($order->info['total'] - $total_deductions < 0) || ($payment == 'free' && ($order->info['total'] - $total_deductions > 0))) In my setup, the payment fails if credit_covers = true. So it looks to me like this says: payment fails IF (too much deductions were applied (total < total_deductions)) OR (if $payment == 'free' AND not enough deductions were applied to cover the total (total > deductions)) The second part is to catch the bug where $payment is 'free' as it should, but the deductions don't cover the total because they were not applied (because of the bug). Am I missing something? Thanks for working with me on this. Your help is GREATLY appreciated
  15. cinolas

    Checkout when order total is $0

    That is a good idea. Which actually leads me to the last modification I want to make: preventing checkout when the total after payment > 0 (not fully paid). In all my repetitive testing of the checkout process with Gift Vouchers I've found that sometimes (rarely, randomly it seems) the Gift Voucher balance doesn't actually get applied. I'm not sure why, and it only happens when going back and forth between checkout_confirm.php and checout_shipping.php repetitively. To prevent any chances of someone being able to checkout when the total after payment and discounts > $0 I'm thinking this would be a good place to add the check. That IF looks like this now, after your recommendations: if ($order->info['total'] - $total_deductions < 0 ) { if(!tep_session_is_registered('credit_covers')) tep_session_register('credit_covers'); $credit_covers = true; }else{ // belts and suspenders to get rid of credit_covers variable if it gets set once and they put something else in the cart if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers'); } I'm changing it to: if (($order->info['total'] - $total_deductions < 0) || ($payment == 'free' && ($order->info['total'] - $total_deductions > 0))) { if(!tep_session_is_registered('credit_covers')) tep_session_register('credit_covers'); $credit_covers = true; }else{ // belts and suspenders to get rid of credit_covers variable if it gets set once and they put something else in the cart if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers'); } Does that make sense? Just making sure I'm not doing anything dumb. Cheers!
  16. cinolas

    Free Product Checkout Module (Bypass Payment)

    Problem solved. The Gift Voucher contrib was emptying the $payment variable on checkout_process.php around line 70
  17. cinolas

    Gift Vouchers Secure

    Well, I've found a solution to my problem, so I'm posting it here too, in case others are trying to achieve something similar. If you are using the Gift Voucher Secure contrib with a payment module such as the Free payment module linked above, you simply need to comment out line 64 of checkout_process.php, like so: //Begin Gift Vouchers Secure //if ($credit_covers) $payment=''; //End Gift Vouchers Secure $payment does not need to be emptied since we are using a payment method (the modified Free module).
  18. cinolas

    Checkout when order total is $0

    I believe I've found what clears the selected payment method! Line 62 of my checkout_process.php has a line from the Gift Voucher contrib that clears $payment: //Begin Gift Vouchers Secure if ($credit_covers) $payment=''; //End Gift Vouchers Secure Even when I use the COD payment method $credit_covers is TRUE and $payment is set to ' ', which causes the following line: $payment_modules = new payment($payment); to deselect the payment method. In /includes/classes/order_total.php, (line 267 after the Gift Voucher contrib modifications) is: if ($order->info['total'] - $total_deductions <= 0 ) { if(!tep_session_is_registered('credit_covers')) tep_session_register('credit_covers'); $credit_covers = true; } Which explicitly sets $credit_covers to TRUE if the total = $0 @Jack_mcs FOUND IT! NOW what is the best way to modify this for my purpose? Since I'm using the Free payment method contrib in conjunction with the Gift Voucher contrib to achieve a somewhat custom setup, I THINK I can just comment out this part of checkout process, like: //Begin Gift Vouchers Secure //if ($credit_covers) $payment=''; //End Gift Vouchers Secure So that even if the order total = $0, the $payment doesn't get cleared. Is there a downside or risk to doing this? THANKS!
  19. cinolas

    Checkout when order total is $0

    Thanks for the clue @Jack_mcs I added the FALSE to the script but I still get ["selected_module"]=> NULL on checkout_process.php That spot is where I added the script that changes the value of the hidden input, so my code looks like this: $js .= "\n" . 'if (payment_value == "free") {' . "\n" . ' gc_box.value = 1;' . "\n" . ' submitter = 1;' . "\n" . ' }' . "\n\n" . ' if (FALSE && payment_value == null && submitter != 1) {' . "\n" . ' error_message = error_message + "' . JS_ERROR_NO_PAYMENT_MODULE_SELECTED . '";' . "\n" . ' error = 1;' . "\n" . ' }' . "\n\n" . ' if (error == 1 && submitter != 1) {' . "\n" . ' alert(error_message);' . "\n" . ' return false;' . "\n" . ' } else {' . "\n" . ' return true;' . "\n" . ' }' . "\n" . '}' . "\n" . '//--></script>' . "\n"; And that seems to work (setting the gc_box.value). Again, I'm just mentioning this in case I made a newb mistake and that's what the problem is.
  20. cinolas

    Checkout when order total is $0

    @ecartz You're onto something. With a var_dump on both the checkout_confirmation.php and checkout_process.php, when I try to checkout with an order total = $0 I get this on checkout_confirmation.php: ["selected_module"]=> string(4) "cod" but on checkout_process.php the selected_module is now NULL: ["selected_module"]=> NULL If I do the same with a regular order where the total > $0 selected_module remains "cod" even on the checkout_process.php page. But why? Where does it empty the selected_module? How can I find that? I searched my osC code for "selected_module" and it seems it should be happening in /includes/classes/payment.php or in the first part of checkout_process.php I also have the Pay Without Account (PWA) contrib installed, and the file /includes/modules/content/login/cm_pwa_login.php also seems to meddle with the selected payment module through some JS. I doubt this has anything to do with it, but it might look like a red flag to you guys: $output .= '<script> function htrn_cm_pwa_payment_update_cfg_value() { var htrn_cm_pwa_payment_selected_modules = \'\'; if ($(\'input[name="cm_pwa_payment_module[]"]\').length > 0) { $(\'input[name="cm_pwa_payment_module[]"]:checked\').each(function() { htrn_cm_pwa_payment_selected_modules += $(this).attr(\'value\') + \';\'; }); if (htrn_cm_pwa_payment_selected_modules.length > 0) { htrn_cm_pwa_payment_selected_modules = htrn_cm_pwa_payment_selected_modules.substring(0, htrn_cm_pwa_payment_selected_modules.length - 1); } } $(\'#htrn_cm_pwa_payment_modules\').val(htrn_cm_pwa_payment_selected_modules); } $(function() { htrn_cm_pwa_payment_update_cfg_value(); if ($(\'input[name="cm_pwa_payment_module[]"]\').length > 0) { $(\'input[name="cm_pwa_payment_module[]"]\').change(function() { htrn_cm_pwa_payment_update_cfg_value(); }); } }); </script>'; Again and again, thank you so much for the help!
  21. cinolas

    Checkout when order total is $0

    @Jack_mcs You're, once again, completely correct. I disabled the Gift Voucher payment module and installed COD, I created a free product and free shipping, and tried to check out and it still wouldn't let me do it. The code catches at exactly the same place: !is_object($$payment) during checkout_process.php What methods are available for me to debug this further? It looks like it IS an object, but obviously it isn't. How can I break this down to see why it's not an object? Or taking this from the other end: Where in this version of osC does it test for the total = $0? OR, combined, why would order total = $0 lead to $$payment ($free) not being an object? Are there characteristic bits of code I should be searching for that might yield some clues? Could my problem be in: ["selected_module"]=> NULL Considering this IF returns FALSE: $payment_modules->selected_module != $payment Thanks all! I'm just really digging for any leads at this point. osC obviously doesn't handle $0 very well, I just have to find where the unhandled exception is. Any help is GOOOOOLD!
  22. cinolas

    Checkout when order total is $0

    Out of curiosity, so I can learn as I go, why would !is_object($$payment) == TRUE just because ["selected_module"]=> NULL? If I break down the IF in my original post and add custom debug messages, to see where it fails, like: if ( ($payment_modules->selected_module != $payment) ) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode('Not same as selected payment'), 'SSL')); } if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) ) ) { if ( !is_object($$payment)) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode('Is an array bigger than 1 AND $$payment is not an object'), 'SSL')); } else { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode('Is an array bigger than 1 but $$payment is an object'), 'SSL')); } } I get "Is an array bigger than 1 AND $$payment is not an object"
  23. cinolas

    Checkout when order total is $0

    That didn't do it, I still get: object(payment)#18 (2) { ["modules"]=> array(4) { [0]=> string(8) "free.php" [1]=> string(7) "cod.php" [2]=> string(16) "moneriscampg.php" [3]=> string(18) "paypal_express.php" } ["selected_module"]=> NULL } bool(true) NULL In fact I commented out the lines inside the first part of the IF and it didn't change anything, so I'm guessing that's not the problematic area after all. Thanks for trying though! I'm a bit weary of just editing code that's part of the checkout process without knowing exactly what it does, for fear that it may have deeper repercussions than just fixing my problem. But you guys keep me going. @Jack_mcs does the Git Voucher contrib empty the selected payment method for any reason? maybe it's doing it somewhere else during confirmation? Cheers to you two!
  24. cinolas

    Checkout when order total is $0

    Thanks @Jack_mcs, that sounds like a lot of work and I'm not sure it would be conclusive since I can't move everything to Frozen, and I don't understand quite enough to mix match both versions. Could the bit above, from the Gift Voucher contrib, be deselecting the payment module? Which I figure could be an unforeseen side-effect of mixing those two contribs. I'm not sure what check_credit_covers() does, so I'm not sure when $credit_covers is TRUE or not. But I'm thinking it checks to see if the credit balance "covers" the total of the invoice, and if so disables the payment module? Which would make sense if you're operating without the Free payment module that I'm trying to integrate, but in my scenario I think I want to keep the module selected? Searching blindly here, it may have nothing to do with my problem
  25. cinolas

    Checkout when order total is $0

    Thanks @ecartz, 'free' is the module code for the Free payment module I'm using as part of my install. It gets selected like a regular payment module. I've only made one change to it. I changed the update_status() so that it would only be available if there's enough Gift Voucher balance on that customer's account to pay for the entire order: if (tep_session_is_registered('customer_id')) { $gv_query = tep_db_query("select amount from coupon_gv_customer where customer_id = '" . tep_db_input($_SESSION['customer_id']) . "'"); $gv_result = tep_db_fetch_array($gv_query); } if ($order->info['total'] > $gv_result['amount']) { $this->enabled = false; } Re-reading this just now I got suspicious that the function may not work the second time, once the Gift Voucher has been applied and the total is $0. And it looked to me like it was being run from checkout_process.php, line 88, just before the problematic, but I commented out the disabling in the payment module and it gave me the same results, so I clearly don't understand what's happening. I'm not sure exactly where the $_SESSION['payment'] is normally set. I searched my code for bits that changed the selected_module, and of note is this part of /includes/classes/payment.php that deals with that and was changed by the Gift Voucher contrib. Everything else appears to be stock. // Begin Gift Vouchers Secure // check credit covers was setup to test whether credit covers is set in other parts of the code function check_credit_covers() { global $credit_covers; return $credit_covers; } function pre_confirmation_check() { global $credit_covers, $payment_modules; if (is_array($this->modules)) { if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) ) { if ($credit_covers) { $GLOBALS[$this->selected_module]->enabled = false; $GLOBALS[$this->selected_module] = NULL; $payment_modules = ''; } else { $GLOBALS[$this->selected_module]->pre_confirmation_check(); } } } } // End Gift Vouchers Secure
×