Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php |
— | — | @@ -160,8 +160,19 @@ |
161 | 161 | return $wgOut->redirect( $formAction ); |
162 | 162 | } |
163 | 163 | |
164 | | - } else { |
| 164 | + } elseif ( $payment_method == 'cash' ) { |
| 165 | + |
165 | 166 | $this->adapter->do_transaction( 'INSERT_ORDERWITHPAYMENT' ); |
| 167 | + |
| 168 | + $formAction = $this->adapter->getTransactionDataFormAction(); |
| 169 | + |
| 170 | + // Redirect to the bank |
| 171 | + if ( !empty( $formAction ) ) { |
| 172 | + return $wgOut->redirect( $formAction ); |
| 173 | + } |
| 174 | + |
| 175 | + } else { |
| 176 | + $this->adapter->do_transaction( 'INSERT_ORDERWITHPAYMENT' ); |
166 | 177 | } |
167 | 178 | |
168 | 179 | return $this->resultHandler(); |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php |
— | — | @@ -314,6 +314,7 @@ |
315 | 315 | 'SWIFTCODE' => 'swift_code', |
316 | 316 | 'TRANSACTIONTYPE' => 'transaction_type', // dd:GB,NL |
317 | 317 | 'ZIP' => 'zip', |
| 318 | + 'FISCALNUMBER' => 'fiscal_number', //Boletos |
318 | 319 | ); |
319 | 320 | } |
320 | 321 | |
— | — | @@ -625,6 +626,13 @@ |
626 | 627 | 'label' => 'Real time bank transfer', |
627 | 628 | 'types' => array( 'rtbt_ideal', 'rtbt_eps', 'rtbt_sofortuberweisung', 'rtbt_nordea_sweden', 'rtbt_enets', ), |
628 | 629 | ); |
| 630 | + |
| 631 | + // Cash payments |
| 632 | + $this->payment_meathods['cash'] = array( |
| 633 | + 'label' => 'Cash payments', |
| 634 | + 'types' => array( 'cash_boleto', ), |
| 635 | + ); |
| 636 | + |
629 | 637 | } |
630 | 638 | |
631 | 639 | /** |
— | — | @@ -749,6 +757,7 @@ |
750 | 758 | 'keys' => array(), |
751 | 759 | ); |
752 | 760 | |
| 761 | + |
753 | 762 | /* |
754 | 763 | * Direct debit |
755 | 764 | * |
— | — | @@ -964,6 +973,16 @@ |
965 | 974 | 831 => 'Sparda-Bank', |
966 | 975 | ) |
967 | 976 | ); |
| 977 | + |
| 978 | + // Cash Payments - Boletos |
| 979 | + |
| 980 | + $this->payment_submethods['cash_boleto'] = array( |
| 981 | + 'paymentproductid' => 1503, |
| 982 | + 'label' => 'Boleto Bancario Brazil', |
| 983 | + 'group' => 'cash', |
| 984 | + 'validation' => array(), |
| 985 | + 'keys' => array(), |
| 986 | + ); |
968 | 987 | } |
969 | 988 | |
970 | 989 | /** |
— | — | @@ -1949,6 +1968,14 @@ |
1950 | 1969 | $this->setupStagePaymentMethodForEWallets( $payment_submethod, $type); |
1951 | 1970 | break; |
1952 | 1971 | |
| 1972 | + /* Cash payments */ |
| 1973 | + case 'cash_boleto': |
| 1974 | + $this->staged_data['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid']; |
| 1975 | + $this->var_map['PAYMENTPRODUCTID'] = 'payment_product'; |
| 1976 | + |
| 1977 | + $this->addKeyToTransaction('FISCALNUMBER'); |
| 1978 | + break; |
| 1979 | + |
1953 | 1980 | /* Online bank transfer */ |
1954 | 1981 | case 'bpay': |
1955 | 1982 | $this->staged_data['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid']; |