MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

AVS Code in [data session cybercash_error]



******    message to minivend-users from Dan Goldman <dano@nodewarrior.net>     ******

Hi All,

I thought I would share some exiting changes I've made to Order.pm so that
I can retrieve the AVS Code (Address Verification Code) on cybercash
transactions via the [data session cybercash_error] tag.

Some of you may not remember, but a while ago I posted a question regarding
how I can retrieve the CyberCash AVS Code and display it on my report.html.
 Well, I never got any responses, so I decided to tear my hair out and find
the answer on my own.  Well I found it!!

I modified the following lines of code in Order.pm:

OLD Code:
        if($result{MStatus} !~ /^success/) {
                $Vend::Session->{cybercash_error} = $result{MErrMsg};
                return undef;
        }
        elsif($result{MStatus} =~ /success-duplicate/) {
                $Vend::Session->{cybercash_error} = $result{MErrMsg};
        }
        else {
                $Vend::Session->{cybercash_error} = '';

NEW Code:
        if($result{MStatus} !~ /^success/) {
                $Vend::Session->{cybercash_error} = $result{MErrMsg};
                return undef;
        }
        elsif($result{MStatus} =~ /success-duplicate/) {
                $Vend::Session->{cybercash_error} = $result{MErrMsg};
        }
        else {
                $Vend::Session->{cybercash_error} = $result{'avs-code'};



You'll see I modified the last line which sets the cybercash_error to the
'avs-code' variable which I found in the CyberCash Development Guide.  I
then added the line [data session cybercash_error] to my report.html and I
now have the Address Verification code on my reports!!!

I'm sure many of you out there who are concerned about Stolen Credit Cards
would appreciate this little code change as it would save tons of time from
the many long hours of clicking through the CyberCash Payment Server admin
interface just to retrieve the AVS Code.

Mike:  Do you think you can add this change permanantly into the Order.pm?

Regards,
Dan Goldman

PS:   One side note, now I can test these results on the fly in the
report.html so that I can taylor my email confirmation to the customer and
ask for additional Address information when the address code = "N".



-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: