Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php |
— | — | @@ -84,26 +84,14 @@ |
85 | 85 | // dispatch forms/handling |
86 | 86 | if ( $this->adapter->checkTokens() ) { |
87 | 87 | |
88 | | - //TODO: Get rid of $data out here completely, by putting this logic inside the adapter somewhere. |
89 | | - //All we seem to be doing with it now, is internal adapter logic outside of the adapter. |
90 | | - $data = $this->adapter->getData_Raw(); |
91 | | - |
92 | 88 | if ( $this->adapter->posted ) { |
93 | 89 | |
94 | 90 | // The form was submitted and the payment method has been set |
95 | | - /* |
96 | | - * The $payment_method should default to false. |
97 | | - * |
98 | | - * An invalid $payment_method will cause an error. |
99 | | - */ |
| 91 | + $payment_method = $this->adapter->getPaymentMethod(); |
| 92 | + $payment_submethod = $this->adapter->getPaymentSubmethod(); |
100 | 93 | |
101 | | - $payment_method = ( isset( $data['payment_method'] ) && !empty( $data['payment_method'] ) ) ? $data['payment_method'] : 'cc'; |
102 | | - $payment_submethod = ( isset( $data['payment_submethod'] ) && !empty( $data['payment_submethod'] ) ) ? $data['payment_submethod'] : ''; |
103 | | - |
104 | | - $payment_submethodMeta = $this->adapter->getPaymentSubmethodMeta( $payment_submethod, array( 'log' => true, ) ); |
105 | | - |
106 | 94 | // Check form for errors |
107 | | - $form_errors = $this->validateForm( $this->errors, $payment_submethodMeta['validation'] ); |
| 95 | + $form_errors = $this->validateForm( $this->errors, $this->adapter->getPaymentSubmethodFormValidation() ); |
108 | 96 | |
109 | 97 | // If there were errors, redisplay form, otherwise proceed to next step |
110 | 98 | if ( $form_errors ) { |
— | — | @@ -172,6 +160,10 @@ |
173 | 161 | $this->adapter->do_transaction( 'GET_ORDERSTATUS' ); |
174 | 162 | $this->displayResultsForDebug(); |
175 | 163 | } |
| 164 | + |
| 165 | + //TODO: Get rid of $data out here completely, by putting this logic inside the adapter somewhere. |
| 166 | + //All we seem to be doing with it now, is internal adapter logic outside of the adapter. |
| 167 | + $data = $this->adapter->getData_Raw(); |
176 | 168 | |
177 | 169 | // If the result of the previous transaction was failure, set the retry message. |
178 | 170 | if ( $data && array_key_exists( 'response', $data ) && $data['response'] == 'failure' ) { |