Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

cinolas

Members
  • Content count

    285
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by cinolas

  1. I'm using the PayPal App 5.018 on osC 2.34 BS GOLD. I currently use 2 payments modules, Moneris for CC processing, and PayPal Express Checkout. On checkout_payment Moneris is pre-selected, with the CC input fields showing under the radio button, and then PayPal Express Checkout under that as an alternative. I'm switching from Moneris to Payments Pro (Direct Payment) via Payflow, which requires PayPal Express Checkout for PayPal payments. Everything seems to be working, but strangely the credit card input fields for Payments Pro (Direct Payment) are on checkout_confirmation, and not on checkout_payment like the Moneris module. Is there any way to move those fields to checkout_payment, and show confirmation data instead on checkout_confirmation? PayPal is suggesting I use the old version of PayPal Express Checkout (Payflow Edition) and Payment Pro (Direct Payment) from 2014... I'm not sure that's a good idea. Would it solve my problem? Thanks!
  2. Unfortunately @Harald Ponce de Leon has retired from osCommerce support (after 21 yrs!!! understandable) Anyone has any idea how this could be achieved? I'm frankly surprised there isn't another post about it already. The CC fields on the confirmation page is slightly weird, and makes the payment page solely to chose the payment method. I'd be willing to pay for some help.
  3. My PayPal App is no longer working. I only use Express Checkout, and I removed the button on the cart page so it has to go through the checkout process to the payment method. Everything seems fine on my site but after the log-in page on PayPal it loads a generic error page that reads: "Things don't appear to be working at the moment. Please try again later." The Return to Merchant button sends the user back to their shopping cart. There's nothing in my logs, and I'm not sure I even have access to a log at PayPal. Any idea?
  4. 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...
  5. 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.
  6. 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.
  7. 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
  8. Never mind got it: I.IP.SURF,I.SP.SURF No space....
  9. @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!
  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. Problem solved. The Gift Voucher contrib was emptying the $payment variable on checkout_process.php around line 70
  14. 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).
  15. Thanks, @14steve14. I have set it to be the first payment module, but it looks like setting the correct number of other payment modules was just for when you want to bypass the payment page. I do need the payment page still, that's where the Gift Vouchers are applied. From the install instructions: Though even if you bypass both the payment and shipping pages, it's the confirmation page that refuses my order. I am not sure why. and not sure how to debug past that is_object($$payment) Thanks for the help!
  16. cinolas

    Gift Vouchers Secure

    Understood, I will. I just thought that part would be instrumental to the next version of this contrib working well with the Free payment module mod. But yeah, I get it. I'll post here when I have a solution. I did follow the link and read the threads, but none of them actually come up with an answer. The closest they get is with the same Free payment module, when used with a different coupon contrib that applies the coupon on the shopping cart page, so it's all about bypassing the payment page. I need the payment page because that's where the gift vouchers are applied Will post in General. Cheers!
  17. cinolas

    Gift Vouchers Secure

    SO CLOSE! 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) $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... I'll keep on kicking it until it works, I'm so close.
  18. Specifically: is_object($$payment) Which is weird because $payment = 'free' and a var_dump on checkout_confirmation.php shows: ["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" }
  19. Oops I'm wrong, the first condition is TRUE. The problem appears to be with : is_object($$payment) && ($$payment->enabled == false) is_object($$payment) && ($$payment->enabled == false) Any ideas?
  20. I'm trying to install this contribution on osC 2.3.4 BS GOLD, to be used with the Gift Voucher contribution: https://apps.oscommerce.com/KMILS&amp;gift-vouchers-secure-v1-0 Everything is in place but when I get to checkout_confirmation.php and click the Confirm button, I get sent back to the checkout_payment.php with this error: "Please select a payment method for your order." The problem is caused by line 90 of checkout_process.php: 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')); } The first condition is false because $payment_modules->selected_module = NULL Why would it be false?
  21. cinolas

    Gift Vouchers Secure

    BUT it still won't let me checkout with an order total of $0 !!! DOH.... I guess I should've tested that Free payment module before doing all that... Sigh. two steps forward...
  22. cinolas

    Gift Vouchers Secure

    Ok, so it wasn't that difficult after all. I added an ID to the hidden checkbox. In the __construct() function of /includes/modules/order_total/ot_gv.php to this: function __construct() { global $order, $currencies; $this->code = 'ot_gv'; $this->title = MODULE_ORDER_TOTAL_GV_TITLE; $this->header = MODULE_ORDER_TOTAL_GV_HEADER; $this->description = MODULE_ORDER_TOTAL_GV_DESCRIPTION; $this->enabled = MODULE_ORDER_TOTAL_GV_STATUS; $this->sort_order = MODULE_ORDER_TOTAL_GV_SORT_ORDER; $this->include_shipping = MODULE_ORDER_TOTAL_GV_INC_SHIPPING; $this->include_tax = MODULE_ORDER_TOTAL_GV_INC_TAX; $this->calculate_tax = MODULE_ORDER_TOTAL_GV_CALC_TAX; $this->credit_tax = MODULE_ORDER_TOTAL_GV_CREDIT_TAX; $this->tax_class = MODULE_ORDER_TOTAL_GV_TAX_CLASS; $this->show_redeem_box = MODULE_ORDER_TOTAL_GV_REDEEM_BOX; $this->credit_class = true; // Added test to see if there's enough Gift Certificate balance to cover the entire order. If so, hide the Gift Certificate checkbox, if not hide the Free payment module and show the checkbox 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->user_prompt = MODULE_ORDER_TOTAL_GV_USER_PROMPT; $this->checkbox = $this->user_prompt . ' (' . $currencies->format($gv_result['amount']) . ') <input type="checkbox" onClick="submitFunction()" id="GiftCertBox" name="' . 'c' . $this->code . '">'; } else { $this->user_prompt = ''; $this->checkbox = $this->user_prompt . '<input type="hidden" value="0" id="GiftCertBox "name="' . 'c' . $this->code . '">'; } $this->output = array(); } Then I modified the javascript_validation() function of /includes/classes/payment.php, line 76: function javascript_validation() { $js = ''; if (is_array($this->modules)) { $js = '<script><!-- ' . "\n" . 'function check_form() {' . "\n" . ' var error = 0;' . "\n" . ' var error_message = "' . JS_ERROR . '";' . "\n" . ' var payment_value = null;' . "\n" . ' var gc_box = document.getElementById("GiftCertBox");' . "\n" . ' if (document.checkout_payment.payment.length) {' . "\n" . ' for (var i=0; i<document.checkout_payment.payment.length; i++) {' . "\n" . ' if (document.checkout_payment.payment[i].checked) {' . "\n" . ' payment_value = document.checkout_payment.payment[i].value;' . "\n" . ' }' . "\n" . ' }' . "\n" . ' } else if (document.checkout_payment.payment.checked) {' . "\n" . ' payment_value = document.checkout_payment.payment.value;' . "\n" . ' } else if (document.checkout_payment.payment.value) {' . "\n" . ' payment_value = document.checkout_payment.payment.value;' . "\n" . ' }' . "\n\n"; reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($GLOBALS[$class]->enabled) { $js .= $GLOBALS[$class]->javascript_validation(); } } //$js .= "\n" . ' if (payment_value == null) {' . "\n" . // ' error_message = error_message + "' . JS_ERROR_NO_PAYMENT_MODULE_SELECTED . '";' . "\n" . // ' error = 1;' . "\n" . // ' }' . "\n\n" . // ' if (error == 1) {' . "\n" . // ' alert(error_message);' . "\n" . // ' return false;' . "\n" . // ' } else {' . "\n" . // ' return true;' . "\n" . // ' }' . "\n" . // '}' . "\n" . // '//--></script>' . "\n"; // Begin Gift Vouchers Secure $js .= "\n" . ' if (payment_value == null && submitter != 1) {' . "\n" . ' error_message = error_message + "' . JS_ERROR_NO_PAYMENT_MODULE_SELECTED . '";' . "\n" . ' error = 1;' . "\n" . ' }' . "\n\n" . ' if (payment_value == "free") {' . "\n" . ' gc_box.value = 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"; // End Gift Vouchers Secure Basically just adding: var gc_box = document.getElementById("GiftCertBox"); At the top, and at the bottom before the return: if (payment_value == "free") { gc_box.value = 1; } And that properly changes the value of the hidden checkbox! So on the checkout_confirmation.php page it shows Gift Voucher amount being removed, and the total is $0, and the selected payment method is the Free payment method as it all should be!
  23. cinolas

    Gift Vouchers Secure

    Now, the only thing left to do for this to work, is to change the JS so it sets the value of the hidden Gift Vouher checkbox to 1 when the Free payment method is selected... or otherwise cause the gift voucher balance to be applied just as if the customer had checked the Gift Voucher checkbox. That JS, after the Gift Voucher modifications, looks like this: function javascript_validation() { $js = ''; if (is_array($this->modules)) { $js = '<script><!-- ' . "\n" . 'function check_form() {' . "\n" . ' var error = 0;' . "\n" . ' var error_message = "' . JS_ERROR . '";' . "\n" . ' var payment_value = null;' . "\n" . ' if (document.checkout_payment.payment.length) {' . "\n" . ' for (var i=0; i<document.checkout_payment.payment.length; i++) {' . "\n" . ' if (document.checkout_payment.payment[i].checked) {' . "\n" . ' payment_value = document.checkout_payment.payment[i].value;' . "\n" . ' }' . "\n" . ' }' . "\n" . ' } else if (document.checkout_payment.payment.checked) {' . "\n" . ' payment_value = document.checkout_payment.payment.value;' . "\n" . ' } else if (document.checkout_payment.payment.value) {' . "\n" . ' payment_value = document.checkout_payment.payment.value;' . "\n" . ' }' . "\n\n"; reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($GLOBALS[$class]->enabled) { $js .= $GLOBALS[$class]->javascript_validation(); } } //$js .= "\n" . ' if (payment_value == null) {' . "\n" . // ' error_message = error_message + "' . JS_ERROR_NO_PAYMENT_MODULE_SELECTED . '";' . "\n" . // ' error = 1;' . "\n" . // ' }' . "\n\n" . // ' if (error == 1) {' . "\n" . // ' alert(error_message);' . "\n" . // ' return false;' . "\n" . // ' } else {' . "\n" . // ' return true;' . "\n" . // ' }' . "\n" . // '}' . "\n" . // '//--></script>' . "\n"; // Begin Gift Vouchers Secure $js .= "\n" . ' if (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"; // End Gift Vouchers Secure } return $js; } I'm no better at JS than I am at php... though it looks like the "payment_value" should contain which payment module is selected. "Submitter" is set to 1 by javascript when the user clicks the gift voucher checkbox. But I don't think submitter=1 means the checkbox is checked, because it's not a toggle behavior: var submitter = null; function submitFunction() { submitter = 1; } I probably don't understand what it's doing I will post on stackexchange or something. I'll let you know if I find a solution. Cheers!
  24. cinolas

    Gift Vouchers Secure

    I'm using this one: https://apps.oscommerce.com/Get&amp;xy0S8&amp;JuIEu But I changed the bottom half of the update_status() function. On line 55 of /includes/modules/payment/free.php: // Enable the module if the order total is equal or less than the Gift Voucher balance // Added test to see if there's enough Gift Voucher balance to cover the entire order. If so, hide the Gift Voucher checkbox, if not hide the Free payment module and show the checkbox 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; } And then I changed line 27 of /includes/modules/order_total/ot_gv.php from: $this->checkbox = $this->user_prompt . '<input type="checkbox" onClick="submitFunction()" name="' . 'c' . $this->code . '">'; to: // Added test to see if there's enough Gift Voucher balance to cover the entire order. If so, hide the Gift Voucher checkbox, if not hide the Free payment module and show the checkbox 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->user_prompt = MODULE_ORDER_TOTAL_GV_USER_PROMPT; $this->checkbox = $this->user_prompt . ' (' . $currencies->format($gv_result['amount']) . ')&nbsp;<input type="checkbox" onClick="submitFunction()" name="' . 'c' . $this->code . '">'; } else { $this->user_prompt = ''; $this->checkbox = $this->user_prompt . '<input type="hidden" value="0" name="' . 'c' . $this->code . '">'; }
  25. cinolas

    Gift Vouchers Secure

    @Jack_mcs! So I've been working on making this work for my purpose, and I think I (we, with the help of ecartz) found a process that would work even better for your contribution as a whole: I've modified my files so that the "Apply Gift Voucher Balance" checkbox only shows up on checkout_payment.php if there's not enough to pay for the entire order. If there IS enough to pay for the entire order, a modified version of the Free payment module shows up instead, but the label reads "Pay with my Gift Voucher balance". To the user, the Gift Voucher balance shows up as a payment method (that allows $0 orders) if they have enough to cover the order. Or as an additional checkbox, so that they can both apply their Gift Voucher balance AND select a payment method for the remainder. Slick! Wouldn't this be a nice addition to the next version?
×