[ic] lib/Vend/Payment.pm patch

John Beima interchange-users@interchange.redhat.com
Fri Mar 29 02:06:01 2002


G'Day Randy,

I am not sure why you would need this patch. When you are using iTransact,
Signio, or AuthorizeNet modules and the credit card fails the error DOES display
at the top of the page...

The error you mention below is when there isn't all the required fields filled
out in the form. It is the check PRIOR to trying to process the card.

My guess would be you changed your checkout form without updating your checkout
profile.


John Beima
jbeima@palb.com, support@alocalagent.com, and support@alocalchurch.com

P.A.L.B. Systems - Phone: (780)451-1086 - Fax: (780)447-4760
11639-122 Street, Edmonton, Alberta, Canada, T5M 0B6

Affordable Web Pages - Phone: (888)932-9990 - Fax: (256)351-7297
2713B Spring Place SW, Decatur, Alabama, United States, 35603



Quoting Randy Moore <ramoore@axion-it.net>:

> Hi,
> 
> This is a small patch for lib/Vend/Payment.pm (in v 4.8.3) that sets the
> $Vend::Session->{errors}{mv_credit_card_valid} hash when a payment module 
> returns a failure.
> 
> This is needed so that the [error std_label="Credit Card Information" 
> name=mv_credit_card_valid] tag on the checkout page can show an appropriate
> 
> error message when the credit card payments fail for some reason.  Without 
> this patch, when a payment fails, the checkout page will show the standard 
> message:
>          There were errors in your last submission.
>          They are shown in RED below
> 
> But, the credit card field does NOT show up in red and the error message 
> doesn't appear anywhere on the page.
> 
> There may be good reasons why these messages should NOT show up on the 
> checkout page, but I can't think of any.  There also could be better ways 
> to fix this, but this patch should fix it for all payment modules.
> 
> --- Payment.pm.orig     Fri Mar 29 01:06:30 2002
> +++ Payment.pm  Fri Mar 29 00:55:54 2002
> @@ -437,6 +437,7 @@
> 
>          if($result{$svar} !~ /^success/) {
>                  $Vend::Session->{payment_error} = $result{$evar};
> +               $Vend::Session->{errors}{mv_credit_card_valid} = 
> $result{$evar};
>                  $result{'invalid-order-id'} = delete $result{'order-id'}
>                          if $result{'order-id'};
>          }
> Randy Moore
> Axion Information Technologies, Inc.
> 
> email     ramoore@axion-it.net
> phone   301-408-1200
> fax        301-445-3947
> 
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users
> 


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/