Targeting specific decline codes in API-based forms

Options
Is there a way to know on the actual donation form what the returned error code is for a failed transaction? 

Most specifically, I'm hoping to be able to craft an experience for people who have hit an IP block or email block, but I don't know if that info is returned to the session or only recorded in LO for reporting purposes. 

 
Tagged:

Comments

  • On API based forms there is a way.

    http://open.convio.com/api/#donation_api.donate_method.html


    If you scroll down a bit to Donation Errors you will see that the API returns an errorResponse object in XML or JSON that includes a lot of info when an error occurs.


    All the possible codes are documented here: http://open.convio.com/api/#main.error_codes.html


    Are you using Luminate-Extend? The examples show basics on how to handle errors in the callback right around line 106 in:

    https://github.com/noahcooper/luminateExtend/blob/master/examples/bootstrap/js/luminateExtend-examples.js


    You could add a switch statement in there to catch specific errors too. Something like:


    switch (data.errorResponse.code)

    {


        // Error.

        case "123":

            $(".errorMessage").append("<br />Something specific about this error.");

            break;


        // Default error.

        default:

            $(".errorMessage").append("<br />" + data.errorResponse.message + " (code: " + data.errorResponse.code + ")");

            break;

    }


    $(".errorMessage").fadeIn();
  • One thing to note is that by design no specific error is returned in the API response for things like an IP or email block, as those are intended to stop a bad actor from doing things like a carding attack. We don't want to tell them that the reason for a decline is their IP or email, because then they'll just change those things.
  • Yep - we were able to come up with a solution for this. However, we are still dealing with a card run issue. Back to the drawing boards.

    /brandy


    =====================================================================

    Please note that this e-mail and any files transmitted from
    Memorial Sloan Kettering Cancer Center may be privileged, confidential,
    and protected from disclosure under applicable law. If the reader of
    this message is not the intended recipient, or an employee or agent
    responsible for delivering this message to the intended recipient,
    you are hereby notified that any reading, dissemination, distribution,
    copying, or other use of this communication or any of its attachments
    is strictly prohibited. If you have received this communication in
    error, please notify the sender immediately by replying to this message
    and deleting this message, any attachments, and all copies and backups
    from your computer.

Categories