17 if ( empty( $normalized[
'payment_method'] ) ) {
18 $stagedData[
'payment_method'] =
'';
19 $stagedData[
'payment_submethod'] =
'';
22 $payment_method = $normalized[
'payment_method'];
23 $payment_submethod = $normalized[
'payment_submethod'];
28 if ( !$payment_submethod ) {
29 $trythis = $payment_method .
'_' . strtolower( $normalized[
'country'] );
31 $payment_submethod = $trythis;
32 $stagedData[
'payment_submethod'] = $payment_submethod;
37 if ( $payment_submethod ) {
40 if ( isset( $submethod_data[
'paymentproductid'] ) ) {
41 $stagedData[
'payment_product'] = $submethod_data[
'paymentproductid'];
44 catch ( OutOfBoundsException $ex ) {
48 $logger->debug(
"payment_submethod found to be empty. Probably okay though." );
51 switch ( $payment_method ) {
53 $stagedData[
'date_collect'] = gmdate(
'Ymd' );
54 $stagedData[
'direct_debit_text'] =
'Wikimedia Foundation';
57 $stagedData[
'descriptor'] =
'Wikimedia Foundation/Wikipedia';
62 switch ( $payment_submethod ) {
64 $stagedData[
'transaction_type'] =
'01';
67 $stagedData[
'transaction_type'] =
'01';