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 | |
— | — | @@ -566,7 +567,7 @@ |
567 | 568 | 'ORDERID', |
568 | 569 | 'EFFORTID', |
569 | 570 | 'PAYMENTPRODUCTID', |
570 | | - ), |
| 571 | + ),bt |
571 | 572 | ) |
572 | 573 | ) |
573 | 574 | ), |
— | — | @@ -629,6 +630,13 @@ |
630 | 631 | 'label' => 'Real time bank transfer', |
631 | 632 | 'types' => array( 'rtbt_ideal', 'rtbt_eps', 'rtbt_sofortuberweisung', 'rtbt_nordea_sweden', 'rtbt_enets', ), |
632 | 633 | ); |
| 634 | + |
| 635 | + // Cash payments |
| 636 | + $this->payment_meathods['cash'] = array( |
| 637 | + 'label' => 'Cash payments', |
| 638 | + 'types' => array( 'cash_boleto', ), |
| 639 | + ); |
| 640 | + |
633 | 641 | } |
634 | 642 | |
635 | 643 | /** |
— | — | @@ -753,6 +761,7 @@ |
754 | 762 | 'keys' => array(), |
755 | 763 | ); |
756 | 764 | |
| 765 | + |
757 | 766 | /* |
758 | 767 | * Direct debit |
759 | 768 | * |
— | — | @@ -968,6 +977,16 @@ |
969 | 978 | 831 => 'Sparda-Bank', |
970 | 979 | ) |
971 | 980 | ); |
| 981 | + |
| 982 | + // Cash Payments - Boletos |
| 983 | + |
| 984 | + $this->payment_submeathods['cash_boleto'] = array( |
| 985 | + 'paymentproductid' => 1503, |
| 986 | + 'label' => 'Boleto Bancario Brazil', |
| 987 | + 'group' => 'cash', |
| 988 | + 'validation' => array(), |
| 989 | + 'keys' => array(), |
| 990 | + ); |
972 | 991 | } |
973 | 992 | |
974 | 993 | /** |
— | — | @@ -1942,6 +1961,14 @@ |
1943 | 1962 | $this->setupStagePaymentMethodForEWallets( $payment_submethod, $type); |
1944 | 1963 | break; |
1945 | 1964 | |
| 1965 | + /* Cash payments */ |
| 1966 | + case 'cash_boleto': |
| 1967 | + $this->staged_data['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid']; |
| 1968 | + $this->var_map['PAYMENTPRODUCTID'] = 'payment_product'; |
| 1969 | + |
| 1970 | + $this->addKeyToTransaction('FISCALNUMBER'); |
| 1971 | + break; |
| 1972 | + |
1946 | 1973 | /* Online bank transfer */ |
1947 | 1974 | case 'bpay': |
1948 | 1975 | $this->staged_data['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid']; |
Index: trunk/extensions/DonationInterface/gateway_common/interface.i18n.php |
— | — | @@ -342,7 +342,7 @@ |
343 | 343 | 'donate_interface-bt-country_description' => 'Country description', |
344 | 344 | 'donate_interface-bt-payment_reference' => 'Payment reference', |
345 | 345 | 'donate_interface-bt-swift_code' => 'Swift code', |
346 | | - 'donate_interface-bt-special_id' => 'Special ID', |
| 346 | + 'donate_interface-bt-special_id' => 'Country specific information', |
347 | 347 | 'donate_interface-bt-information' => 'Bank transfer information', |
348 | 348 | 'donate_interface-bt-finished' => 'Finished', |
349 | 349 | |
— | — | @@ -412,6 +412,7 @@ |
413 | 413 | |
414 | 414 | // HTTP errors |
415 | 415 | 'donate_interface-error-http-403' => 'You do not have permission to access this page.', |
| 416 | + |
416 | 417 | ); |
417 | 418 | |
418 | 419 | /** Message documentation (Message documentation) |
— | — | @@ -755,7 +756,7 @@ |
756 | 757 | 'donate_interface-bt-country_description' => 'Bank transfer: Country description', |
757 | 758 | 'donate_interface-bt-payment_reference' => 'Bank transfer: Payment reference', |
758 | 759 | 'donate_interface-bt-swift_code' => 'Bank transfer: Swift code', |
759 | | - 'donate_interface-bt-special_id' => 'Bank transfer: Special ID', |
| 760 | + 'donate_interface-bt-special_id' => 'Bank transfer: Label for country specific bank transfer information (for example ABA number for the USA)', |
760 | 761 | 'donate_interface-bt-information' => 'Bank transfer: Bank transfer information', |
761 | 762 | 'donate_interface-bt-finished' => 'Bank transfer: Finished - this is a link or a button to take the user to the Thank you page for their donation.', |
762 | 763 | 'donate_interface-obt-biller_id' => 'BPAY (Australian Online Bank Transfer) - The label for biller code', |