[freeside-commits] branch FREESIDE_4_BRANCH updated. 3a5b7daafec5b35dee29f8be3594a046479d91b8

Ivan ivan at 420.am
Mon Jun 15 12:04:24 PDT 2015


The branch, FREESIDE_4_BRANCH has been updated
       via  3a5b7daafec5b35dee29f8be3594a046479d91b8 (commit)
      from  d429bc37e213980ebcd35d602c8fc9842eddbdb0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3a5b7daafec5b35dee29f8be3594a046479d91b8
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Jun 15 12:04:22 2015 -0700

    self-service API: allow changing CVV with edit_info, RT#36795

diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 8acc1a6..0ebd821 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -821,16 +821,16 @@ sub edit_info {
 
     if ( $new->payinfo eq $cust_main->paymask ) {
       $new->payinfo($cust_main->payinfo);
+      $new->paycvv( $p->{'paycvv'} || $cust_main->paycvv );
     } else {
       $new->payinfo($p->{'payinfo'});
+      return { 'error' => 'CVV2 is required' }
+        if ! $p->{'paycvv'} && $conf->exists('selfservice-onfile_require_cvv');
+      $new->paycvv( $p->{'paycvv'} )
     }
 
     $new->set( 'payby' => $p->{'auto'} ? 'CARD' : 'DCRD' );
 
-    if ( $conf->exists('selfservice-onfile_require_cvv') ){
-      return { 'error' => 'CVV2 is required' } unless $p->{'paycvv'};
-    }
-
   } elsif ( $payby =~ /^(CHEK|DCHK)$/ ) {
 
     my $payinfo;

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/ClientAPI/MyAccount.pm |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list