Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php |
— | — | @@ -758,7 +758,7 @@ |
759 | 759 | 'label' => 'Direct debit: AT', |
760 | 760 | 'group' => 'dd', |
761 | 761 | 'validation' => array(), |
762 | | - 'keys' => array( 'ACCOUNTNAME', 'ACCOUNTNUMBER', 'BANKCODE', 'BANKNAME', 'DIRECTDEBITTEXT', ), |
| 762 | + 'keys' => array( 'ACCOUNTNAME', 'ACCOUNTNUMBER', 'BANKCODE', /*'BANKNAME',*/ 'DIRECTDEBITTEXT', ), |
763 | 763 | ); |
764 | 764 | |
765 | 765 | // Direct debit: BE |
— | — | @@ -768,6 +768,7 @@ |
769 | 769 | 'group' => 'dd', |
770 | 770 | 'validation' => array(), |
771 | 771 | 'keys' => array( 'ACCOUNTNAME', 'ACCOUNTNUMBER', 'AUTHORISATIONID', 'BANKCHECKDIGIT', 'BANKCODE', 'BANKNAME', 'DIRECTDEBITTEXT', ), |
| 772 | + //'keys' => array( /*'ACCOUNTNAME',*/ 'ACCOUNTNUMBER', 'AUTHORISATIONID', /*'BANKCHECKDIGIT',*/ 'BANKCODE', /*'BANKNAME',*/ 'DIRECTDEBITTEXT', ), |
772 | 773 | ); |
773 | 774 | |
774 | 775 | // Direct debit: CH |
— | — | @@ -776,7 +777,7 @@ |
777 | 778 | 'label' => 'Direct debit: CH', |
778 | 779 | 'group' => 'dd', |
779 | 780 | 'validation' => array(), |
780 | | - 'keys' => array( 'ACCOUNTNAME', 'ACCOUNTNUMBER', 'ADDRESSLINE1E', 'ADDRESSLINE2', 'ADDRESSLINE3', 'ADDRESSLINE4', 'BANKCODE', 'BANKNAME', 'CUSTOMERBANKCITY', 'CUSTOMERBANKNUMBER', 'CUSTOMERBANKSTREET', 'CUSTOMERBANKZIP', 'DIRECTDEBITTEXT', 'IBAN', ), |
| 781 | + 'keys' => array( 'ACCOUNTNAME', 'ACCOUNTNUMBER', 'ADDRESSLINE1E', 'ADDRESSLINE2', 'ADDRESSLINE3', 'ADDRESSLINE4', 'BANKCODE', /*'BANKNAME',*/ /*'CUSTOMERBANKCITY', 'CUSTOMERBANKNUMBER', 'CUSTOMERBANKSTREET', 'CUSTOMERBANKZIP',*/ 'DIRECTDEBITTEXT', 'IBAN', ), |
781 | 782 | ); |
782 | 783 | |
783 | 784 | // Direct debit: DE |
— | — | @@ -785,7 +786,7 @@ |
786 | 787 | 'label' => 'Direct debit: DE', |
787 | 788 | 'group' => 'dd', |
788 | 789 | 'validation' => array(), |
789 | | - 'keys' => array( 'ACCOUNTNAME', 'ACCOUNTNUMBER', 'BANKCODE', 'BANKNAME', 'DIRECTDEBITTEXT', ), |
| 790 | + 'keys' => array( 'ACCOUNTNAME', 'ACCOUNTNUMBER', 'BANKCODE', /*'BANKNAME',*/ 'DIRECTDEBITTEXT', ), |
790 | 791 | ); |
791 | 792 | |
792 | 793 | // Direct debit: ES |
— | — | @@ -794,7 +795,7 @@ |
795 | 796 | 'label' => 'Direct debit: ES', |
796 | 797 | 'group' => 'dd', |
797 | 798 | 'validation' => array(), |
798 | | - 'keys' => array( 'ACCOUNTNAME', 'ACCOUNTNUMBER', 'BANKCODE', 'BANKNAME', 'BRANCHCODE', 'BANKCHECKDIGIT', 'CUSTOMERBANKCITY', 'CUSTOMERBANKSTREET', 'CUSTOMERBANKZIP', 'DIRECTDEBITTEXT', 'DOMICILIO', 'PROVINCIA', ), |
| 799 | + 'keys' => array( 'ACCOUNTNAME', 'ACCOUNTNUMBER', 'BANKCODE', /*'BANKNAME',*/ 'BRANCHCODE', 'BANKCHECKDIGIT', /*'CUSTOMERBANKCITY', 'CUSTOMERBANKSTREET', 'CUSTOMERBANKZIP',*/ 'DIRECTDEBITTEXT', /*'DOMICILIO', 'PROVINCIA',*/ ), |
799 | 800 | ); |
800 | 801 | |
801 | 802 | // Direct debit: FR |
— | — | @@ -803,7 +804,7 @@ |
804 | 805 | 'label' => 'Direct debit: FR', |
805 | 806 | 'group' => 'dd', |
806 | 807 | 'validation' => array(), |
807 | | - 'keys' => array( 'ACCOUNTNAME', 'ACCOUNTNUMBER', 'BANKCODE', 'BANKNAME', 'BRANCHCODE', 'BANKCHECKDIGIT', 'DIRECTDEBITTEXT', ), |
| 808 | + 'keys' => array( 'ACCOUNTNAME', 'ACCOUNTNUMBER', 'BANKCODE', /*'BANKNAME',*/ 'BRANCHCODE', 'BANKCHECKDIGIT', 'DIRECTDEBITTEXT', ), |
808 | 809 | ); |
809 | 810 | |
810 | 811 | // Direct debit: GB |
— | — | @@ -812,7 +813,7 @@ |
813 | 814 | 'label' => 'Direct debit: GB', |
814 | 815 | 'group' => 'dd', |
815 | 816 | 'validation' => array(), |
816 | | - 'keys' => array( 'ACCOUNTNUMBER', 'AUTHORISATIONID', 'BANKCODE', 'BANKNAME', 'DIRECTDEBITTEXT', 'TRANSACTIONTYPE', ), |
| 817 | + 'keys' => array( 'ACCOUNTNUMBER', 'AUTHORISATIONID', 'BANKCODE', /*'BANKNAME',*/ 'DIRECTDEBITTEXT', 'TRANSACTIONTYPE', ), |
817 | 818 | ); |
818 | 819 | |
819 | 820 | // Direct debit: IT |
— | — | @@ -821,7 +822,7 @@ |
822 | 823 | 'label' => 'Direct debit: IT', |
823 | 824 | 'group' => 'dd', |
824 | 825 | 'validation' => array(), |
825 | | - 'keys' => array( 'ACCOUNTNAME', 'ACCOUNTNUMBER', 'BANKCODE', 'BANKNAME', 'BRANCHCODE', 'BANKAGENZIA', 'BANKCHECKDIGIT', 'BANKFILIALE', 'CUSTOMERBANKCITY', 'CUSTOMERBANKNUMBER', 'CUSTOMERBANKSTREET', 'CUSTOMERBANKZIP', 'DIRECTDEBITTEXT', ), |
| 826 | + 'keys' => array( 'ACCOUNTNAME', 'ACCOUNTNUMBER', 'BANKCODE', /*'BANKNAME',*/ 'BRANCHCODE', 'BANKAGENZIA', 'BANKCHECKDIGIT', /*'BANKFILIALE',*/ /*'CUSTOMERBANKCITY', 'CUSTOMERBANKNUMBER', 'CUSTOMERBANKSTREET', 'CUSTOMERBANKZIP',*/ 'DIRECTDEBITTEXT', ), |
826 | 827 | ); |
827 | 828 | |
828 | 829 | // Direct debit: NL |
— | — | @@ -830,7 +831,7 @@ |
831 | 832 | 'label' => 'Direct debit: NL', |
832 | 833 | 'group' => 'dd', |
833 | 834 | 'validation' => array(), |
834 | | - 'keys' => array( 'ACCOUNTNAME', 'ACCOUNTNUMBER', 'BANKNAME', 'DIRECTDEBITTEXT', 'TRANSACTIONTYPE', ), |
| 835 | + 'keys' => array( 'ACCOUNTNAME', 'ACCOUNTNUMBER', /*'BANKNAME',*/ 'DIRECTDEBITTEXT', 'TRANSACTIONTYPE', ), |
835 | 836 | ); |
836 | 837 | |
837 | 838 | /* |
— | — | @@ -1437,6 +1438,9 @@ |
1438 | 1439 | /** |
1439 | 1440 | * Set the bank validation error messages for the client. |
1440 | 1441 | * |
| 1442 | + * @todo |
| 1443 | + * - Only the first message will be returned. The reason is there are no translations for DO_BANKVALIDATION |
| 1444 | + * |
1441 | 1445 | * The messages have already been generated at this point. The purpose of |
1442 | 1446 | * this method is to pass them to the view. |
1443 | 1447 | */ |
— | — | @@ -1448,7 +1452,15 @@ |
1449 | 1453 | |
1450 | 1454 | $errors = isset( $checks['errors'] ) ? $checks['errors'] : array(); |
1451 | 1455 | |
1452 | | - $this->setTransactionResult( $errors, 'errors' ); |
| 1456 | + $errorsToBeDisplayed = array(); |
| 1457 | + foreach ( $errors as $code => $error ) { |
| 1458 | + $errorsToBeDisplayed[ $code ] = $this->getErrorMapByCodeAndTranslate( $code ); |
| 1459 | + |
| 1460 | + // This break is temporary. All errors will have the same message. Only display it once. |
| 1461 | + break; |
| 1462 | + } |
| 1463 | + |
| 1464 | + $this->setTransactionResult( $errorsToBeDisplayed, 'errors' ); |
1453 | 1465 | } |
1454 | 1466 | |
1455 | 1467 | /** |