Page 4 of 36 FirstFirst ... 2345614 ... LastLast
Results 31 to 40 of 354
  1. #31
    Join Date
    Sep 2006
    Posts
    281
    Plugin Contributions
    0

    Default Re: Need help with Virtual Merchant module

    switch (true) {
    case (zen_not_null($curl_error)):
    if($curl_error == 'SSL connection timeout') {$errorstr = '&errormessage=' . urlencode(MYVIRTUALMERCHANT_ERROR_MESSAGE_TIME_OUT);}
    $error_return = 'payment_error=' . $this->code . $errorstr . '&myvirtualmerchant_cc_owner=' . urlencode($_SESSION['myvirtualmerchant_cc_owner']) . '&myvirtualmerchant_cc_expires_month=' . $_SESSION['myvirtualmerchant_cc_expires_month'] . '&myvirtualmerchant_cc_expires_year=' . $_SESSION['myvirtualmerchant_cc_expires_year'] . '&myvirtualmerchant_cvv_number=' . $_SESSION['myvirtualmerchant_cvv_number']. '&myvirtualmerchant_cvv_indicator=' . $_SESSION['myvirtualmerchant_cvv_indicator'];
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, $error_return, 'SSL', true, false));
    break;
    case ($response['ssl_result'] !0):
    $error_return = 'payment_error=' . $this->code . '&errormessage=' . urlencode($response['ssl_result_message']) . '&myvirtualmerchant_cc_owner=' . urlencode($_POST['myvirtualmerchant_cc_owner']) . '&myvirtualmerchant_cc_expires_month=' . $_SESSION['myvirtualmerchant_cc_expires_month'] . '&myvirtualmerchant_cc_expires_year=' . $_SESSION['myvirtualmerchant_cc_expires_year'] . '&myvirtualmerchant_cvv_number=' . $_SESSION['myvirtualmerchant_cvv_number']. '&myvirtualmerchant_cvv_indicator=' . $_SESSION['myvirtualmerchant_cvv_indicator'];
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, $error_return, 'SSL', true, false));
    break;
    default:
    ($response['ssl_result'] == 0):
    }

    I did some reading up on Switch Statements; above is my 'slimmed' version of the statement. My issue is that when I go to the payment form now I get a white screen. Nothing is hitting the error log or error console. So . . . the only thing I can think of is sytax errors. What I'm trying to do is to keep from having to list every single possible return. So in the above I'm trying to say, if ssl_result is not equal to 0 then redirect to checkout_payment and display error messages. If ssl_result is equal to 0 then carry on.


    Now my problem is a blank white page when I get to the check out page. All of my work is going on at

    www.ccfaq.org

    IF someone has authorized referrers turned on and they do not have the correct referrer listed in their VM or ViaKLIX setup; OR if they pass a field that exceeds character limit then an ssl_result is NOT returned at all. Instead an ssl_error_code is returned. BUT it only gets returned IF you pass a ssl_error_url.

    Any ideas?
    [FONT="Georgia"]Samuel Turnmire[/FONT]
    [FONT="Century Gothic"]co-Founder[/FONT]
    [FONT="Book Antiqua"]geekFoundry[/FONT]

  2. #32
    Join Date
    Sep 2006
    Posts
    281
    Plugin Contributions
    0

    Default Re: Need help with Virtual Merchant module



    Guys . . . I don't know what to tell ya. I'm back to my orginal code. I've removed the security holes, added USER ID use; updated a lot of the fields to make it flow a lot better. The only thing I can't get past is this error handling. I need someone who's an expert with ZenCart to help with this. I'm at my wits end. I've now spent a solid 12 hours trying this and trying that only to end up back where I started. I do at least have an understanding of the problem. I am, and always have been, an expert on ViaKlix and VirtualMerchant; without giving too much away, you could say I have more knowledge than most . . . I would say the most knowledge of anyone on the boards. The issue is not my understanding of VM or KLIX; it's my lack of understanding of PHP and ZenCart (which is actually not that bad, but as I can't figure this out my faith is shaken)

    So one more time, here is the problem. In order for a transaction to be successful you need to get an ssl_result of 0 or ssl_result='0' . Declines, as referenced by a Decline from a card issuer or any message that comes from Nova's systems are already handled. In my testing I got 'Call Auth Center' and 'Please Retry 5303' error messages. These typically will have an ssl_result message of say 2 or 1 or 5000; depending on the message. The problem comes with logic errors.
    Typically Zen & Java handle most of those. Credit Card not passing the Mod 10 check, an invalid expiry date, etc;. However, there are some that Zen miss as it has no way of knowing the settings that are setup in the Admin side of VM or Klix. An example I keep referring to is the HTTP referrers. Logic errors are returned or 'stopped' at the gateway level and never reach Nova (understanding I mean Nova the processor not Nova the developer of VM & Klix) As I was saying, I continue to refer to HTTP referrers but this would also apply to someone having an address that was too long and up until a fix of theirs went in anyone that had a dash (-) in their email would have gotten a logic error.
    So, as it stands currently the module will work but I STRONGLY recommend that NO ONE install it until these issues are resolved. This was to be my first contribution to the community and I will not release a half done product. That said, I'll share where my problem is and I hope someone out there can lend a hand. Here is the error handling:

    switch (true) {
    case (zen_not_null($curl_error)):
    if($curl_error == 'SSL connection timeout') {$errorstr = '&errormessage=' . urlencode(MYVIRTUALMERCHANT_ERROR_MESSAGE_TIME_OUT);}
    $error_return = 'payment_error=' . $this->code . $errorstr . '&myvirtualmerchant_cc_owner=' . urlencode($_SESSION['myvirtualmerchant_cc_owner']) . '&myvirtualmerchant_cc_expires_month=' . $_SESSION['myvirtualmerchant_cc_expires_month'] . '&myvirtualmerchant_cc_expires_year=' . $_SESSION['myvirtualmerchant_cc_expires_year'] . '&myvirtualmerchant_cvv_number=' . $_SESSION['myvirtualmerchant_cvv_number']. '&myvirtualmerchant_cvv_indicator=' . $_SESSION['myvirtualmerchant_cvv_indicator'];
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, $error_return, 'SSL', true, false));
    break;
    // note to self mack - removed === to be ==
    case ($response['ssl_result'] == 0):
    //APPROVED - no redirect needed
    break;
    case ($response['ssl_result'] == 1 ||
    $response['ssl_result'] == 4000 ||
    $response['ssl_result'] == 5000 ||
    $response['ssl_result'] == 6000):
    //USER ERROR
    $error_return = 'payment_error=' . $this->code . '&errormessage=' . urlencode($response['ssl_result_message']) . '&myvirtualmerchant_cc_owner=' . urlencode($_POST['myvirtualmerchant_cc_owner']) . '&myvirtualmerchant_cc_expires_month=' . $_SESSION['myvirtualmerchant_cc_expires_month'] . '&myvirtualmerchant_cc_expires_year=' . $_SESSION['myvirtualmerchant_cc_expires_year'] . '&myvirtualmerchant_cvv_number=' . $_SESSION['myvirtualmerchant_cvv_number']. '&myvirtualmerchant_cvv_indicator=' . $_SESSION['myvirtualmerchant_cvv_indicator'];
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, $error_return, 'SSL', true, false));
    break;
    case ($response['ssl_result'] == 2 ||
    $response['ssl_result'] == 3 ||
    $response['ssl_result'] == 4 ||
    $response['ssl_result'] == 'N/A' ||
    $response['ssl_result'] == 1000 ||
    $response['ssl_result'] == 4016 ||
    $response['ssl_result'] == 7000 ||
    $response['ssl_result'] == 8000):
    //INTERNAL ERROR
    $error_return = 'payment_error=' . $this->code . '&errormessage=' . urlencode(MYVIRTUALMERCHANT_ERROR_MESSAGE_INTERNAL_ERROR) . '&myvirtualmerchant_cc_owner=' . urlencode($_SESSION['myvirtualmerchant_cc_owner']) . '&myvirtualmerchant_cc_expires_month=' . $_SESSION['myvirtualmerchant_cc_expires_month'] . '&myvirtualmerchant_cc_expires_year=' . $_SESSION['myvirtualmerchant_cc_expires_year'] . '&myvirtualmerchant_cvv_number=' . $_SESSION['myvirtualmerchant_cvv_number']. '&myvirtualmerchant_cvv_indicator=' . $_SESSION['myvirtualmerchant_cvv_indicator'];
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, $error_return, 'SSL', true, false));
    break;
    default:
    // die('here');
    error_log("ERROR - Hit default result for transaction. ssl_result " . $response['ssl_result'] , 0);
    $error_return = 'payment_error=' . $this->code . '&myvirtualmerchant_cc_owner=' . urlencode($_SESSION['myvirtualmerchant_cc_owner']) . '&myvirtualmerchant_cc_expires_month=' . $_SESSION['myvirtualmerchant_cc_expires_month'] . '&myvirtualmerchant_cc_expires_year=' . $_SESSION['myvirtualmerchant_cc_expires_year'] . '&myvirtualmerchant_cvv_number=' . $_SESSION['myvirtualmerchant_cvv_number']. '&myvirtualmerchant_cvv_indicator=' . $_SESSION['myvirtualmerchant_cvv_indicator'];
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, $error_return, 'SSL', true, false));
    }
    }

    function after_process() {
    unset($_SESSION['myvirtualmerchant_cc_number'], $_SESSION['myvirtualmerchant_cc_expires_month'], $_SESSION['myvirtualmerchant_cc_expires_year'], $_SESSION['myvirtualmerchant_cvv_indicator'], $_SESSION['myvirtualmerchant_cvv_number']);
    return false;
    }

    function get_error() {
    global $_GET;

    $error = array('title' => MYVIRTUALMERCHANT_ERROR_HEADING,
    'error' => MYVIRTUALMERCHANT_ERROR_HEADING . '<br />' . ((isset($_GET['errormessage'])) ? stripslashes(urldecode($_GET['errormessage'])) : MYVIRTUALMERCHANT_ERROR_MESSAGE_GENERAL));

    return $error;
    }



    The ideal would be to have something that looked for ssl_result=0; if it found said result then it would continue on. If it found ssl_result=>0 (greater than 0) or if it doesn't get an ssl_result at all then it would return the customer to the previous page (checkout_payment) with instructions to try again and if problems persist to contact the site owner or try an alternate form of payment.

    I'm open to ANY suggestions.

    Thank you,
    [FONT="Georgia"]Samuel Turnmire[/FONT]
    [FONT="Century Gothic"]co-Founder[/FONT]
    [FONT="Book Antiqua"]geekFoundry[/FONT]

  3. #33
    Join Date
    Oct 2007
    Posts
    13
    Plugin Contributions
    0

    Default Re: Need help with Virtual Merchant module

    I'm going to look over the code. The problem is I'm not an expert at PHP so I'm not srue if I can help much. Nor am I an expert at Zen cart! But I think I understand what you are trying to accomplish. Would it be helpfull to look at some other payment modules code to see if there are any similiraties? Just a thought. My college entry level C programming class has gotten me through a couple of new languages in various projects. But sometimes I feel like this...

    Hopefully a fresh set of eyes can help. Throwing that code up on the mod forum might produce some results too.

  4. #34
    Join Date
    Sep 2006
    Posts
    281
    Plugin Contributions
    0

    Default Re: Need help with Virtual Merchant module

    I really appreciate the assist. I did change to using an 'if' statement . . . and; well . . .

    Now I've got an odd issue.

    So when I force my logic error by turning on 'use http referrers' (leaving the auth referrer field blank) I get an output like this:

    -------------
    There has been an error processing your credit card!
    " transactionDto.getErrorMsg() --
    -------------

    which is fine because I can search on that and figure it out. So, to test it to make sure my changes are working I go and turn off 'Use HTTP referrers' and now I get this:

    -------------
    There has been an error processing your credit card!
    APPROVED
    -------------

    See, I think that's great! ha ha But, I do think I know what the problem might be. However, it's time to head into 'The Office' so I must put this on hold for now. Looks like the 'if' statement is going to work though as opposed to the switch.
    [FONT="Georgia"]Samuel Turnmire[/FONT]
    [FONT="Century Gothic"]co-Founder[/FONT]
    [FONT="Book Antiqua"]geekFoundry[/FONT]

  5. #35
    Join Date
    Aug 2006
    Posts
    23
    Plugin Contributions
    0

    Default Re: Need help with Virtual Merchant module

    Well for better or worse I'm stuck with you on this. My client had a lot of trouble in the process ofsigning up with Authorize.net so she ditched them and went with who she knows, which is VM.

    (horray for me)

    As best as I can tell I might have about the same PHP know-how... so I'm not sure how much I can assist. But this is an overdu project, we are using VM, and it will be my top priority this week getting it to work.

    So here goes...
    I've been Zenened, and I've got Tylonol.

  6. #36
    Join Date
    Sep 2006
    Posts
    281
    Plugin Contributions
    0

    Default Re: Need help with Virtual Merchant module

    Ha ha, welcome to the asylum Leovenous!

    I have an idea I'm about to try. I'll let you know if anything earth shattering happens.
    [FONT="Georgia"]Samuel Turnmire[/FONT]
    [FONT="Century Gothic"]co-Founder[/FONT]
    [FONT="Book Antiqua"]geekFoundry[/FONT]

  7. #37
    Join Date
    Oct 2007
    Posts
    13
    Plugin Contributions
    0

    Default Re: Need help with Virtual Merchant module

    Well today I'm getting some virtual merchant "training" over the phone. My client called and set me up with this. Now, my client also said that they told him that they support Zen Cart. But then my client doens't really know what hes talking about. I would assume what the virtual merchant people mean is that they supports zen cart in a manner explained in the developer's guide they put out. Well I'll see today when they call.

  8. #38
    Join Date
    Oct 2007
    Posts
    13
    Plugin Contributions
    0

    Default Re: Need help with Virtual Merchant module

    Well I talked with the virtual merchant help desk. And it was just as I figured. Zen cart should be able to work with virtual merchant which we already know. We just need to get the module running. So nothing new there. I'm going to read over the developers guide and look what they suggest. They are running everything in html. Is it possible to use their code in this module?

    Oh and it looks like ThePatch, you are using the viaklix module that is around the internet. Is that correct?

    I've got tomorrow off from my real job so I'm going to sit down and take a look at whats going in more detail.

  9. #39
    Join Date
    Sep 2006
    Posts
    281
    Plugin Contributions
    0

    Default Re: Need help with Virtual Merchant module

    Yea, I knew they would not be able to help any; all they are allowed to say is "here is the dev guide" and then help troubleshoot. If you were to call them with the issues we were having they would say, "Sounds like your module doesn't know how to handle logic errors."

    They are right.

    Yep, that's what I'm using. I've got it working to run transactions and all. Already fixed all those bugs. I also removed the drop down for cvv2 indicator; also added a user id field in the admin set up area. I'd like to set it to where there are 3 options under 'test' and production by adding 'demo'. If 'demo' is selected then it will be sent to https://demo.myvirtualmerchant.com/V...emo/process.do

    I'm looking at just rewriting Auth.net's module maybe? LOL I have enlisted the help of a fellow coder though. Hopefully we'll get things figured out soon.
    [FONT="Georgia"]Samuel Turnmire[/FONT]
    [FONT="Century Gothic"]co-Founder[/FONT]
    [FONT="Book Antiqua"]geekFoundry[/FONT]

  10. #40
    Join Date
    Aug 2006
    Posts
    7
    Plugin Contributions
    0

    Default Re: Need help with Virtual Merchant module

    Hi there ThePatch and miragewsu,
    I just was getting ready to sign on with VM and thought I'd look in on the possibility of a payment module in ZenCart.....and here you are trying to sort it out at the same moment!
    I have a limited PHP background but will take a look as well at the VM developers guide and at some code for another gateway (usight) I struggled with error handling on. It works now with help from others.
    I haven't signed on with VM yet but was planning to tomorrow if this avenue looks hopeful.

 

 
Page 4 of 36 FirstFirst ... 2345614 ... LastLast

Similar Threads

  1. MultiSite Module Support Thread
    By Gerome in forum All Other Contributions/Addons
    Replies: 1910
    Last Post: 29 Sep 2014, 09:54 AM
  2. Paymant Module Failures
    By rich_li_ny in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 19 Aug 2007, 09:33 AM
  3. Linkpoint payment module problems
    By bvrettski in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 17 Jul 2007, 03:54 PM
  4. Echo CC Merchant Module for 1.3.x
    By agile4 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 28 Feb 2007, 01:43 PM
  5. How to Start a NEW PAYMENT MODULE.
    By momopopo in forum Addon Payment Modules
    Replies: 3
    Last Post: 4 Aug 2006, 09:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •