Index: trunk/extensions/DonationInterface/tests/Adapter/GatewayAdapterTestCase.php |
— | — | @@ -112,6 +112,9 @@ |
113 | 113 | |
114 | 114 | $gateway = new $testAdapter( $options ); |
115 | 115 | |
| 116 | + //please define this function only inside the TESTS_ADAPTER_DEFAULT, |
| 117 | + //which should be a test adapter object that descende from one of the |
| 118 | + //production adapters. |
116 | 119 | $this->assertInstanceOf( 'DonationData', $gateway->getDonationData() ); |
117 | 120 | } |
118 | 121 | } |
Index: trunk/extensions/DonationInterface/tests/DonationInterfaceTestCase.php |
— | — | @@ -52,7 +52,6 @@ |
53 | 53 | * @covers GatewayAdapter::__construct |
54 | 54 | * @covers GatewayAdapter::setCurrentTransaction |
55 | 55 | * @covers GatewayAdapter::buildRequestXML |
56 | | - * @covers GatewayAdapter::getData |
57 | 56 | */ |
58 | 57 | public function buildRequestXmlForGlobalCollect( $optionsForTestData, $options ) { |
59 | 58 | |
— | — | @@ -275,7 +274,7 @@ |
276 | 275 | */ |
277 | 276 | public function getExpectedXmlRequestForGlobalCollect( $optionsForTestData, $options = array() ) { |
278 | 277 | |
279 | | - $orderId = $this->gatewayAdapter->getData( 'order_id' ); |
| 278 | + $orderId = $this->gatewayAdapter->getData_Raw( 'order_id' ); |
280 | 279 | |
281 | 280 | $expected = '<?xml version="1.0"?>' . "\n"; |
282 | 281 | $expected .= '<XML>'; |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php |
— | — | @@ -90,32 +90,31 @@ |
91 | 91 | } |
92 | 92 | } |
93 | 93 | |
94 | | - $oid = $this->adapter->getData( 'order_id' ); |
95 | | - $i_oid = $this->adapter->getData( 'i_order_id' ); |
96 | | - $data = $this->adapter->getData(); |
| 94 | + $data = $this->adapter->getData_Raw(); |
| 95 | + $msgPrefix = $data['order_id'] . ' ' . $data['i_order_id'] . ' '; |
97 | 96 | |
98 | 97 | // if approved, display results and send transaction to the queue |
99 | 98 | if ( $errorCode == '1' ) { |
100 | | - $this->log( $oid . " " . $i_oid . " Transaction approved.", LOG_DEBUG ); |
| 99 | + $this->log( $msgPrefix . "Transaction approved.", LOG_DEBUG ); |
101 | 100 | $this->fnPayflowDisplayApprovedResults( $data, $responseMsg ); |
102 | 101 | // give user a second chance to enter incorrect data |
103 | 102 | } elseif ( ( $errorCode == '3' ) && ( $data['numAttempt'] < '5' ) ) { |
104 | | - $this->log( $oid . " " . $i_oid . " Transaction unsuccessful (invalid info).", LOG_DEBUG ); |
| 103 | + $this->log( $msgPrefix . "Transaction unsuccessful (invalid info).", LOG_DEBUG ); |
105 | 104 | // pass responseMsg as an array key as required by displayForm |
106 | 105 | $this->errors['retryMsg'] = $responseMsg; |
107 | 106 | $this->displayForm( $this->errors ); |
108 | 107 | // if declined or if user has already made two attempts, decline |
109 | 108 | } elseif ( ( $errorCode == '2' ) || ( $data['numAttempt'] >= '3' ) ) { |
110 | | - $this->log( $oid . " " . $i_oid . " Transaction declined.", LOG_DEBUG ); |
| 109 | + $this->log( $msgPrefix . "Transaction declined.", LOG_DEBUG ); |
111 | 110 | $this->fnPayflowDisplayDeclinedResults( $responseMsg ); |
112 | 111 | } elseif ( ( $errorCode == '4' ) ) { |
113 | | - $this->log( $oid . " " . $i_oid . " Transaction unsuccessful.", LOG_DEBUG ); |
| 112 | + $this->log( $msgPrefix . "Transaction unsuccessful.", LOG_DEBUG ); |
114 | 113 | $this->fnPayflowDisplayOtherResults( $responseMsg ); |
115 | 114 | } elseif ( ( $errorCode == '5' ) ) { |
116 | | - $this->log( $oid . " " . $i_oid . " Transaction pending.", LOG_DEBUG ); |
| 115 | + $this->log( $msgPrefix . "Transaction pending.", LOG_DEBUG ); |
117 | 116 | $this->fnPayflowDisplayPending( $data, $responseMsg ); |
118 | 117 | } elseif ( ( $errorCode == '1000000' ) ) { //TODO: This is temporary until we can decide on the actual error codes WE control. |
119 | | - $this->log( $oid . " " . $i_oid . " Transaction unsuccessful (communication failure).", LOG_DEBUG ); |
| 118 | + $this->log( $msgPrefix . "Transaction unsuccessful (communication failure).", LOG_DEBUG ); |
120 | 119 | $this->fnPayflowDisplayOtherResults( $responseMsg ); |
121 | 120 | $this->errors['retryMsg'] = $responseMsg; |
122 | 121 | $this->displayForm( $this->errors ); |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro.adapter.php |
— | — | @@ -251,15 +251,15 @@ |
252 | 252 | |
253 | 253 | protected function stage_card_num( $type = 'request' ) { |
254 | 254 | //I realize that the $type isn't used. Voodoo. |
255 | | - $this->postdata['card_num'] = str_replace( ' ', '', $this->postdata['card_num'] ); |
| 255 | + $this->staged_data['card_num'] = str_replace( ' ', '', $this->staged_data['card_num'] ); |
256 | 256 | } |
257 | 257 | |
258 | 258 | //TODO: Something much fancier here. |
259 | 259 | protected function stage_user_ip( $type = 'request' ) { |
260 | | - if ( $this->postdata['user_ip'] === '127.0.0.1' ) { |
261 | | - global $wgDonationInterfaceIPAddress; |
262 | | - if ( !empty( $wgDonationInterfaceIPAddress ) ) { |
263 | | - $this->postdata['user_ip'] = $wgDonationInterfaceIPAddress; |
| 260 | + if ( $this->staged_data['user_ip'] === '127.0.0.1' ) { |
| 261 | + $ipAddress = $this->getGlobal( 'IPAddress' ); |
| 262 | + if ( !empty( $ipAddress ) ) { |
| 263 | + $this->staged_data['user_ip'] = $ipAddress; |
264 | 264 | } |
265 | 265 | } |
266 | 266 | } |
Index: trunk/extensions/DonationInterface/extras/custom_filters/custom_filters.body.php |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | $this->gateway_adapter->setValidationAction( $localAction ); |
62 | 62 | |
63 | 63 | $log_msg = '"' . $localAction . "\"\t\"" . $this->risk_score . "\""; |
64 | | - $this->log( $this->gateway_adapter->getData( 'contribution_tracking_id' ), 'Filtered', $log_msg ); |
| 64 | + $this->log( $this->gateway_adapter->getData_Raw( 'contribution_tracking_id' ), 'Filtered', $log_msg ); |
65 | 65 | return TRUE; |
66 | 66 | } |
67 | 67 | |
Index: trunk/extensions/DonationInterface/extras/custom_filters/filters/source/source.body.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | |
23 | 23 | public function filter() { |
24 | 24 | // pull out the source from the filter object |
25 | | - $source = $this->gateway_adapter->getData( 'utm_source' ); |
| 25 | + $source = $this->gateway_adapter->getData_Raw( 'utm_source' ); |
26 | 26 | |
27 | 27 | // a very complex filtering algorithm for sources |
28 | 28 | $srcRules = $this->gateway_adapter->getGlobal( 'CustomFiltersSrcRules' ); |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | $log_msg .= "\t\"" . addslashes( $regex ) . "\""; |
40 | 40 | $log_msg .= "\t\"" . $this->cfo->risk_score . "\""; |
41 | 41 | $this->log( |
42 | | - $this->gateway_adapter->getData( 'contribution_tracking_id' ), 'Filter: Source', $log_msg |
| 42 | + $this->gateway_adapter->getData_Raw( 'contribution_tracking_id' ), 'Filter: Source', $log_msg |
43 | 43 | ); |
44 | 44 | } |
45 | 45 | } |
Index: trunk/extensions/DonationInterface/extras/custom_filters/filters/minfraud/minfraud.body.php |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | return TRUE; |
19 | 19 | } |
20 | 20 | |
21 | | - $minfraud_query = $this->build_query( $this->gateway_adapter->getData() ); |
| 21 | + $minfraud_query = $this->build_query( $this->gateway_adapter->getData_Raw() ); |
22 | 22 | $this->query_minfraud( $minfraud_query ); |
23 | 23 | |
24 | 24 | |
Index: trunk/extensions/DonationInterface/extras/custom_filters/filters/referrer/referrer.body.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | |
23 | 23 | public function filter() { |
24 | 24 | // pull out the referrer from the gateway_adapter |
25 | | - $referrer = $this->gateway_adapter->getData( 'referrer' ); |
| 25 | + $referrer = $this->gateway_adapter->getData_Raw( 'referrer' ); |
26 | 26 | |
27 | 27 | // a very complex filtering algorithm for referrers |
28 | 28 | $refRules = $this->gateway_adapter->getGlobal( 'CustomFiltersRefRules' ); |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | $log_msg .= "\t\"" . addslashes( $regex ) . "\""; |
40 | 40 | $log_msg .= "\t\"" . $this->cfo->risk_score . "\""; |
41 | 41 | $this->log( |
42 | | - $this->gateway_adapter->getData( 'contribution_tracking_id' ), 'Filter: Referrer', $log_msg |
| 42 | + $this->gateway_adapter->getData_Raw( 'contribution_tracking_id' ), 'Filter: Referrer', $log_msg |
43 | 43 | ); |
44 | 44 | } |
45 | 45 | } |
Index: trunk/extensions/DonationInterface/extras/minfraud/minfraud.body.php |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | return TRUE; |
70 | 70 | } |
71 | 71 | |
72 | | - $minfraud_query = $this->build_query( $this->gateway_adapter->getData() ); |
| 72 | + $minfraud_query = $this->build_query( $this->gateway_adapter->getData_Raw() ); |
73 | 73 | $this->query_minfraud( $minfraud_query ); |
74 | 74 | $localAction = $this->determine_action( $this->minfraud_response['riskScore'] ); |
75 | 75 | $this->gateway_adapter->setValidationAction( $localAction ); |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | // reset the data hash |
78 | 78 | $this->gateway_adapter->unsetHash(); |
79 | 79 | $this->gateway_adapter->setActionHash( $this->generate_hash( $localAction ) ); |
80 | | - $this->gateway_adapter->setHash( $this->generate_hash( $this->gateway_adapter->getData() ) ); |
| 80 | + $this->gateway_adapter->setHash( $this->generate_hash( $this->gateway_adapter->getData_Raw() ) ); |
81 | 81 | |
82 | 82 | // Write the query/response to the log |
83 | 83 | $this->log_query( $minfraud_query, $localAction ); |
— | — | @@ -88,13 +88,13 @@ |
89 | 89 | */ |
90 | 90 | public function log_query( $minfraud_query, $action ) { |
91 | 91 | if ( $this->log_fh ) { |
92 | | - $log_message = '"' . addslashes( $this->gateway_adapter->getData( 'comment' ) ) . '"'; |
93 | | - $log_message .= "\t" . '"' . addslashes( $this->gateway_adapter->getData( 'amount' ) . ' ' . $this->gateway_adapter->getData( 'currency' ) ) . '"'; |
| 92 | + $log_message = '"' . addslashes( $this->gateway_adapter->getData_Raw( 'comment' ) ) . '"'; |
| 93 | + $log_message .= "\t" . '"' . addslashes( $this->gateway_adapter->getData_Raw( 'amount' ) . ' ' . $this->gateway_adapter->getData_Raw( 'currency' ) ) . '"'; |
94 | 94 | $log_message .= "\t" . '"' . addslashes( json_encode( $minfraud_query ) ) . '"'; |
95 | 95 | $log_message .= "\t" . '"' . addslashes( json_encode( $this->minfraud_response ) ) . '"'; |
96 | 96 | $log_message .= "\t" . '"' . addslashes( $action ) . '"'; |
97 | | - $log_message .= "\t" . '"' . addslashes( $this->gateway_adapter->getData( 'referrer' ) ) . '"'; |
98 | | - $this->log( $this->gateway_adapter->getData( 'contribution_tracking_id' ), 'minFraud query', $log_message ); |
| 97 | + $log_message .= "\t" . '"' . addslashes( $this->gateway_adapter->getData_Raw( 'referrer' ) ) . '"'; |
| 98 | + $this->log( $this->gateway_adapter->getData_Raw( 'contribution_tracking_id' ), 'minFraud query', $log_message ); |
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | */ |
113 | 113 | public function can_bypass_minfraud() { |
114 | 114 | // if the data bits data_hash and action are not set, we need to hit minFraud |
115 | | - $localdata = $this->gateway_adapter->getData(); |
| 115 | + $localdata = $this->gateway_adapter->getData_Raw(); |
116 | 116 | if ( !strlen( $localdata['data_hash'] ) || !strlen( $localdata['action'] ) ) { |
117 | 117 | return FALSE; |
118 | 118 | } |
— | — | @@ -123,7 +123,7 @@ |
124 | 124 | // compare the data hash to make sure it's legit |
125 | 125 | if ( $this->compare_hash( $data_hash, serialize( $localdata ) ) ) { |
126 | 126 | |
127 | | - $this->gateway_adapter->setHash( $this->generate_hash( $this->gateway_adapter->getData() ) ); // hash the data array |
| 127 | + $this->gateway_adapter->setHash( $this->generate_hash( $this->gateway_adapter->getData_Raw() ) ); // hash the data array |
128 | 128 | // check to see if we have a valid action set for us to bypass minfraud |
129 | 129 | $actions = array( 'process', 'challenge', 'review', 'reject' ); |
130 | 130 | $action_hash = $localdata['action']; // a hash of the action to take passed in by the form submission |
Index: trunk/extensions/DonationInterface/extras/conversion_log/conversion_log.body.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | // if the trxn has been outright rejected, log it |
13 | 13 | if ( $this->gateway_adapter->getValidationAction() == 'reject' ) { |
14 | 14 | $this->log( |
15 | | - $this->gateway_adapter->getData( 'contribution_tracking_id' ), 'Rejected' |
| 15 | + $this->gateway_adapter->getData_Raw( 'contribution_tracking_id' ), 'Rejected' |
16 | 16 | ); |
17 | 17 | return TRUE; |
18 | 18 | } |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | return FALSE; |
23 | 23 | |
24 | 24 | $this->log( |
25 | | - $this->gateway_adapter->getData( 'contribution_tracking_id' ), "Gateway response: " . addslashes( $this->gateway_adapter->getTransactionMessage() ), '"' . addslashes( json_encode( $this->gateway_adapter->getTransactionData() ) ) . '"' |
| 25 | + $this->gateway_adapter->getData_Raw( 'contribution_tracking_id' ), "Gateway response: " . addslashes( $this->gateway_adapter->getTransactionMessage() ), '"' . addslashes( json_encode( $this->gateway_adapter->getTransactionData() ) ) . '"' |
26 | 26 | ); |
27 | 27 | return TRUE; |
28 | 28 | } |
Index: trunk/extensions/DonationInterface/extras/recaptcha/recaptcha.body.php |
— | — | @@ -42,12 +42,12 @@ |
43 | 43 | $captcha_resp = $this->check_captcha(); |
44 | 44 | if ( $captcha_resp->is_valid ) { |
45 | 45 | // if validated, update the action and move on |
46 | | - $this->log( $this->gateway_adapter->getData( 'contribution_tracking_id' ), 'Captcha passed' ); |
| 46 | + $this->log( $this->gateway_adapter->getData_Raw( 'contribution_tracking_id' ), 'Captcha passed' ); |
47 | 47 | $this->gateway_adapter->setValidationAction( 'process' ); |
48 | 48 | return TRUE; |
49 | 49 | } else { |
50 | 50 | $this->recap_err = $captcha_resp->error; |
51 | | - $this->log( $this->gateway_adapter->getData( 'contribution_tracking_id' ), 'Captcha failed' ); |
| 51 | + $this->log( $this->gateway_adapter->getData_Raw( 'contribution_tracking_id' ), 'Captcha failed' ); |
52 | 52 | } |
53 | 53 | } |
54 | 54 | // display captcha |
— | — | @@ -64,7 +64,7 @@ |
65 | 65 | $useSSL = $this->gateway_adapter->getGlobal( 'RecaptchaUseSSL' ); |
66 | 66 | |
67 | 67 | // log that a captcha's been triggered |
68 | | - $this->log( $this->gateway_adapter->getData( 'contribution_tracking_id' ), 'Captcha triggered' ); |
| 68 | + $this->log( $this->gateway_adapter->getData_Raw( 'contribution_tracking_id' ), 'Captcha triggered' ); |
69 | 69 | |
70 | 70 | // construct the HTML used to display the captcha |
71 | 71 | $captcha_html = Xml::openElement( 'div', array( 'id' => 'mw-donate-captcha' ) ); |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | |
78 | 78 | //TODO: use setValidationErrors and getValidationErrors everywhere, and |
79 | 79 | //refactor all the form constructors one more time. Eventually. |
80 | | - $data = $this->gateway_adapter->getData(); |
| 80 | + $data = $this->gateway_adapter->getData_Raw(); |
81 | 81 | $errors = $this->gateway_adapter->getValidationErrors(); |
82 | 82 | $form_obj = new $form_class( $this->gateway_adapter, $errors ); |
83 | 83 | |
Index: trunk/extensions/DonationInterface/gateway_forms/Form.php |
— | — | @@ -84,7 +84,7 @@ |
85 | 85 | |
86 | 86 | $this->gateway = & $gateway; |
87 | 87 | $this->test = $this->gateway->getGlobal( "Test" ); |
88 | | - $this->form_data = $this->gateway->getDisplayData(); |
| 88 | + $this->form_data = $this->gateway->getData_Raw(); |
89 | 89 | $this->form_errors = & $error; |
90 | 90 | |
91 | 91 | /** |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_resultswitcher.body.php |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | if ( $this->adapter->checkTokens() ) { |
64 | 64 | // Display form for the first time |
65 | 65 | $oid = $wgRequest->getText( 'order_id' ); |
66 | | - $adapter_oid = $this->adapter->getData(); |
| 66 | + $adapter_oid = $this->adapter->getData_Raw(); |
67 | 67 | $adapter_oid = $adapter_oid['order_id']; |
68 | 68 | if ( $oid && !empty( $oid ) && $oid === $adapter_oid ) { |
69 | 69 | if ( !array_key_exists( 'order_status', $_SESSION ) || !array_key_exists( $oid, $_SESSION['order_status'] ) ) { |
— | — | @@ -106,7 +106,7 @@ |
107 | 107 | function getDeclinedResultPage() { |
108 | 108 | global $wgOut; |
109 | 109 | |
110 | | - $displayData = $this->adapter->getDisplayData(); |
| 110 | + $displayData = $this->adapter->getData_Raw(); |
111 | 111 | $failpage = $this->adapter->getGlobal( 'FailPage' ); |
112 | 112 | |
113 | 113 | if ( $failpage ) { |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | |
88 | 88 | //TODO: Get rid of $data out here completely, by putting this logic inside the adapter somewhere. |
89 | 89 | //All we seem to be doing with it now, is internal adapter logic outside of the adapter. |
90 | | - $data = $this->adapter->getDisplayData(); |
| 90 | + $data = $this->adapter->getData_Raw(); |
91 | 91 | |
92 | 92 | if ( $this->adapter->posted ) { |
93 | 93 | |
— | — | @@ -119,7 +119,7 @@ |
120 | 120 | |
121 | 121 | // Display an iframe for credit cards |
122 | 122 | if ( $this->executeIframeForCreditCard() ) { |
123 | | - |
| 123 | + $this->displayResultsForDebug(); |
124 | 124 | // Nothing left to process |
125 | 125 | return; |
126 | 126 | } |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php |
— | — | @@ -767,7 +767,7 @@ |
768 | 768 | $xmlString = $this->stripXMLResponseHeaders( $rawResponse ); |
769 | 769 | $displayXML = $this->formatXmlString( $xmlString ); |
770 | 770 | $realXML = new DomDocument( '1.0' ); |
771 | | - self::log( $this->getData( 'contribution_tracking_id' ) . ": Raw XML Response:\n" . $displayXML ); //I am apparently a huge fibber. |
| 771 | + self::log( $this->getData_Raw( 'contribution_tracking_id' ) . ": Raw XML Response:\n" . $displayXML ); //I am apparently a huge fibber. |
772 | 772 | $realXML->loadXML( trim( $xmlString ) ); |
773 | 773 | return $realXML; |
774 | 774 | } |
— | — | @@ -961,7 +961,7 @@ |
962 | 962 | //set the transaction result message |
963 | 963 | $responseStatus = isset( $response['STATUSID'] ) ? $response['STATUSID'] : ''; |
964 | 964 | $this->setTransactionResult( "Response Status: " . $responseStatus, 'txn_message' ); //TODO: Translate for GC. |
965 | | - $this->setTransactionResult( $this->getData( 'order_id' ), 'gateway_txn_id' ); |
| 965 | + $this->setTransactionResult( $this->getData_Raw( 'order_id' ), 'gateway_txn_id' ); |
966 | 966 | } |
967 | 967 | |
968 | 968 | /** |
— | — | @@ -995,10 +995,10 @@ |
996 | 996 | protected function stage_amount( $type = 'request' ) { |
997 | 997 | switch ( $type ) { |
998 | 998 | case 'request': |
999 | | - $this->postdata['amount'] = $this->postdata['amount'] * 100; |
| 999 | + $this->staged_data['amount'] = $this->staged_data['amount'] * 100; |
1000 | 1000 | break; |
1001 | 1001 | case 'response': |
1002 | | - $this->postdata['amount'] = $this->postdata['amount'] / 100; |
| 1002 | + $this->staged_data['amount'] = $this->staged_data['amount'] / 100; |
1003 | 1003 | break; |
1004 | 1004 | } |
1005 | 1005 | } |
— | — | @@ -1010,8 +1010,8 @@ |
1011 | 1011 | */ |
1012 | 1012 | protected function stage_card_num( $type = 'request' ) { |
1013 | 1013 | //I realize that the $type isn't used. Voodoo. |
1014 | | - if ( array_key_exists( 'card_num', $this->postdata ) ) { |
1015 | | - $this->postdata['card_num'] = str_replace( ' ', '', $this->postdata['card_num'] ); |
| 1014 | + if ( array_key_exists( 'card_num', $this->staged_data ) ) { |
| 1015 | + $this->staged_data['card_num'] = str_replace( ' ', '', $this->staged_data['card_num'] ); |
1016 | 1016 | } |
1017 | 1017 | } |
1018 | 1018 | |
— | — | @@ -1041,10 +1041,11 @@ |
1042 | 1042 | $types = array_flip( $types ); |
1043 | 1043 | } |
1044 | 1044 | |
1045 | | - if ( ( array_key_exists( 'card_type', $this->postdata ) ) && array_key_exists( $this->postdata['card_type'], $types ) ) { |
1046 | | - $this->postdata['card_type'] = $types[$this->postdata['card_type']]; |
| 1045 | + $card_type = $this->getData_Staged('card_type'); |
| 1046 | + if ( ( !is_null( $card_type ) ) && array_key_exists( $card_type, $types ) ) { |
| 1047 | + $this->staged_data['card_type'] = $types[$card_type]; |
1047 | 1048 | } else { |
1048 | | - //$this->postdata['card_type'] = ''; |
| 1049 | + //$this->staged_data['card_type'] = ''; |
1049 | 1050 | //iono: maybe nothing? |
1050 | 1051 | } |
1051 | 1052 | } |
— | — | @@ -1061,15 +1062,15 @@ |
1062 | 1063 | */ |
1063 | 1064 | protected function stage_payment_method( $type = 'request' ) { |
1064 | 1065 | |
1065 | | - $payment_method = array_key_exists( 'payment_method', $this->postdata ) ? $this->postdata['payment_method']: false; |
1066 | | - $payment_submethod = array_key_exists( 'payment_submethod', $this->postdata ) ? $this->postdata['payment_submethod']: false; |
| 1066 | + $payment_method = array_key_exists( 'payment_method', $this->staged_data ) ? $this->staged_data['payment_method']: false; |
| 1067 | + $payment_submethod = array_key_exists( 'payment_submethod', $this->staged_data ) ? $this->staged_data['payment_submethod']: false; |
1067 | 1068 | |
1068 | 1069 | // These will be grouped and ordred by payment product id |
1069 | 1070 | switch ( $payment_submethod ) { |
1070 | 1071 | |
1071 | 1072 | /* Bank transfer */ |
1072 | 1073 | case 'bt': |
1073 | | - $this->postdata['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid']; |
| 1074 | + $this->staged_data['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid']; |
1074 | 1075 | $this->var_map['PAYMENTPRODUCTID'] = 'payment_product'; |
1075 | 1076 | break; |
1076 | 1077 | |
— | — | @@ -1083,12 +1084,12 @@ |
1084 | 1085 | case 'dd_ch': |
1085 | 1086 | case 'dd_it': |
1086 | 1087 | case 'dd_es': |
1087 | | - $this->postdata['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid']; |
| 1088 | + $this->staged_data['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid']; |
1088 | 1089 | $this->var_map['PAYMENTPRODUCTID'] = 'payment_product'; |
1089 | 1090 | $this->var_map['COUNTRYCODEBANK'] = 'country'; |
1090 | 1091 | |
1091 | 1092 | // Currently, this is needed by the Netherlands |
1092 | | - $this->postdata['transaction_type'] = '01'; |
| 1093 | + $this->staged_data['transaction_type'] = '01'; |
1093 | 1094 | |
1094 | 1095 | $this->transactions['INSERT_ORDERWITHPAYMENT']['request']['REQUEST']['PARAMS']['PAYMENT'][] = 'ACCOUNTNAME'; |
1095 | 1096 | $this->transactions['INSERT_ORDERWITHPAYMENT']['request']['REQUEST']['PARAMS']['PAYMENT'][] = 'ACCOUNTNUMBER'; |
— | — | @@ -1109,13 +1110,13 @@ |
1110 | 1111 | case 'rtbt_nordea_sweeden': |
1111 | 1112 | case 'rtbt_enets': |
1112 | 1113 | case 'rtbt_sofortuberweisung': |
1113 | | - $this->postdata['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid']; |
| 1114 | + $this->staged_data['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid']; |
1114 | 1115 | $this->var_map['PAYMENTPRODUCTID'] = 'payment_product'; |
1115 | 1116 | break; |
1116 | 1117 | |
1117 | 1118 | case 'rtbt_eps': |
1118 | 1119 | case 'rtbt_ideal': |
1119 | | - $this->postdata['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid']; |
| 1120 | + $this->staged_data['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid']; |
1120 | 1121 | $this->var_map['PAYMENTPRODUCTID'] = 'payment_product'; |
1121 | 1122 | |
1122 | 1123 | // Add the ISSUERID field if it does not exist |
— | — | @@ -1126,7 +1127,7 @@ |
1127 | 1128 | |
1128 | 1129 | /* Default Case */ |
1129 | 1130 | default: |
1130 | | - //$this->postdata['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid']; |
| 1131 | + //$this->staged_data['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid']; |
1131 | 1132 | //$this->var_map['PAYMENTPRODUCTID'] = 'payment_product'; |
1132 | 1133 | break; |
1133 | 1134 | } |
— | — | @@ -1143,21 +1144,22 @@ |
1144 | 1145 | //TODO: This needs to be more robust (like actually pulling the |
1145 | 1146 | //qstring keys, resetting the values, and putting it all back) |
1146 | 1147 | //but for now it'll keep us alive. |
1147 | | - if ( !strpos( $this->postdata['returnto'], 'order_id' ) ){ |
1148 | | - $queryArray = array( 'order_id' => $this->postdata['order_id'] ); |
1149 | | - $this->postdata['returnto'] = wfAppendQuery( $this->postdata['returnto'], $queryArray ); |
| 1148 | + $returnto = $this->getData_Staged( 'returnto' ); |
| 1149 | + if ( !is_null( $returnto ) && !strpos( $returnto, 'order_id' ) ){ |
| 1150 | + $queryArray = array( 'order_id' => $this->staged_data['order_id'] ); |
| 1151 | + $this->staged_data['returnto'] = wfAppendQuery( $returnto, $queryArray ); |
1150 | 1152 | } |
1151 | 1153 | } |
1152 | 1154 | } |
1153 | 1155 | |
1154 | 1156 | protected function pre_process_insert_orderwithpayment(){ |
1155 | | - if ( $this->getData( 'payment_method' ) === 'cc' ){ |
| 1157 | + if ( $this->getData_Raw( 'payment_method' ) === 'cc' ){ |
1156 | 1158 | $this->addDonorDataToSession(); |
1157 | 1159 | } |
1158 | 1160 | } |
1159 | 1161 | |
1160 | 1162 | protected function pre_process_get_orderstatus(){ |
1161 | | - if ( $this->getData( 'payment_method' ) === 'cc' ){ |
| 1163 | + if ( $this->getData_Raw( 'payment_method' ) === 'cc' ){ |
1162 | 1164 | $this->runPreProcessHooks(); |
1163 | 1165 | } |
1164 | 1166 | } |
— | — | @@ -1171,7 +1173,7 @@ |
1172 | 1174 | * determine if we want to fail the transaction ourselves or not. |
1173 | 1175 | */ |
1174 | 1176 | public function getCVVResult(){ |
1175 | | - if ( is_null( $this->getData( 'cvv_result' ) ) ){ |
| 1177 | + if ( is_null( $this->getData_Raw( 'cvv_result' ) ) ){ |
1176 | 1178 | return null; |
1177 | 1179 | } |
1178 | 1180 | |
— | — | @@ -1185,7 +1187,7 @@ |
1186 | 1188 | '0' => true, //No service available. |
1187 | 1189 | ); |
1188 | 1190 | |
1189 | | - $result = $result_map[$this->getData( 'cvv_result' )]; |
| 1191 | + $result = $result_map[$this->getData_Raw( 'cvv_result' )]; |
1190 | 1192 | return $result; |
1191 | 1193 | |
1192 | 1194 | } |
— | — | @@ -1195,7 +1197,7 @@ |
1196 | 1198 | * determine if we want to fail the transaction ourselves or not. |
1197 | 1199 | */ |
1198 | 1200 | public function getAVSResult(){ |
1199 | | - if ( is_null( $this->getData( 'avs_result' ) ) ){ |
| 1201 | + if ( is_null( $this->getData_Raw( 'avs_result' ) ) ){ |
1200 | 1202 | return null; |
1201 | 1203 | } |
1202 | 1204 | //Best guess here: |
— | — | @@ -1223,7 +1225,7 @@ |
1224 | 1226 | '0' => 50, //No service available. |
1225 | 1227 | ); |
1226 | 1228 | |
1227 | | - $result = $result_map[$this->getData( 'avs_result' )]; |
| 1229 | + $result = $result_map[$this->getData_Raw( 'avs_result' )]; |
1228 | 1230 | return $result; |
1229 | 1231 | } |
1230 | 1232 | |
Index: trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php |
— | — | @@ -151,7 +151,8 @@ |
152 | 152 | */ |
153 | 153 | protected $staged_vars = array(); |
154 | 154 | protected $return_value_map; |
155 | | - protected $postdata; |
| 155 | + protected $staged_data; |
| 156 | + protected $raw_data; |
156 | 157 | protected $postdatadefaults; |
157 | 158 | protected $xmlDoc; |
158 | 159 | protected $dataObj; |
— | — | @@ -160,7 +161,7 @@ |
161 | 162 | protected $validation_errors; |
162 | 163 | protected $current_transaction; |
163 | 164 | protected $action; |
164 | | - public $debugarray; //TODO: Take me out. |
| 165 | + public $debugarray; |
165 | 166 | |
166 | 167 | //ALL OF THESE need to be redefined in the children. Much voodoo depends on the accuracy of these constants. |
167 | 168 | const GATEWAY_NAME = 'Donation Gateway'; |
— | — | @@ -206,8 +207,8 @@ |
207 | 208 | |
208 | 209 | $this->dataObj = new DonationData( get_called_class(), self::getGlobal( 'Test' ), $testData ); |
209 | 210 | |
210 | | - $this->postdata = $this->dataObj->getData(); |
211 | | - //TODO: Fix this a bit. |
| 211 | + $this->raw_data = $this->dataObj->getData(); |
| 212 | + $this->staged_data = $this->raw_data; |
212 | 213 | |
213 | 214 | $this->posted = ( $wgRequest->wasPosted() && ( !is_null( $wgRequest->getVal( 'numAttempt', null ) ) ) ); |
214 | 215 | |
— | — | @@ -218,7 +219,6 @@ |
219 | 220 | $this->defineAccountInfo(); |
220 | 221 | $this->defineReturnValueMap(); |
221 | 222 | |
222 | | - $this->displaydata = $this->postdata; |
223 | 223 | $this->stageData(); |
224 | 224 | } |
225 | 225 | |
— | — | @@ -292,19 +292,20 @@ |
293 | 293 | return $checkResult; |
294 | 294 | } |
295 | 295 | } |
296 | | - |
| 296 | + |
297 | 297 | /** |
298 | | - * Returns staged data from the adapter object. |
| 298 | + * Returns staged data from the adapter object, or null if a key was |
| 299 | + * specified and no value exsits. |
299 | 300 | * @param string $val An optional specific key you want returned. |
300 | 301 | * @return mixed All the staged data held by the adapter, or if a key was |
301 | 302 | * set, the staged value for that key. |
302 | 303 | */ |
303 | | - function getData( $val = '' ) { |
| 304 | + function getData_Staged( $val = '' ) { |
304 | 305 | if ( $val === '' ) { |
305 | | - return $this->postdata; |
| 306 | + return $this->staged_data; |
306 | 307 | } else { |
307 | | - if ( array_key_exists( $val, $this->postdata ) ) { |
308 | | - return $this->postdata[$val]; |
| 308 | + if ( array_key_exists( $val, $this->staged_data ) ) { |
| 309 | + return $this->staged_data[$val]; |
309 | 310 | } else { |
310 | 311 | return null; |
311 | 312 | } |
— | — | @@ -337,22 +338,22 @@ |
338 | 339 | } |
339 | 340 | |
340 | 341 | /** |
341 | | - * Returns the variable $this->dataObj which should be an instance of |
342 | | - * DonationData |
343 | | - * |
344 | | - * @return DonationData |
| 342 | + * This is the ONLY getData type function anything should be using |
| 343 | + * outside the adapter. |
| 344 | + * Please note that in this case, raw means it's been normalized and |
| 345 | + * sanitized by DonationData. Mostly, we qualify it as "raw" because it's |
| 346 | + * not been staged for this adapter. |
| 347 | + * @param string $val The specific key you're looking for (if any) |
| 348 | + * @return mixed An array of all the raw, unstaged (but normalized and |
| 349 | + * sanitized) data sent to the adapter, or if $val was set, either the |
| 350 | + * specific value held for $val, or null if none exists. |
345 | 351 | */ |
346 | | - public function getDonationData() { |
347 | | - |
348 | | - return $this->dataObj; |
349 | | - } |
350 | | - |
351 | | - function getDisplayData( $val = '' ) { |
| 352 | + public function getData_Raw( $val = '' ) { |
352 | 353 | if ( $val === '' ) { |
353 | | - return $this->displaydata; |
| 354 | + return $this->raw_data; |
354 | 355 | } else { |
355 | | - if ( array_key_exists( $val, $this->displaydata ) ) { |
356 | | - return $this->displaydata[$val]; |
| 356 | + if ( array_key_exists( $val, $this->raw_data ) ) { |
| 357 | + return $this->raw_data[$val]; |
357 | 358 | } else { |
358 | 359 | return null; |
359 | 360 | } |
— | — | @@ -534,10 +535,10 @@ |
535 | 536 | if ( $token === true ) { //we just want the field name to use, so short-circuit all that mess. |
536 | 537 | return '@' . $this->var_map[$gateway_field_name]; |
537 | 538 | } |
538 | | - if ( array_key_exists( $this->var_map[$gateway_field_name], $this->postdata ) && |
539 | | - $this->postdata[$this->var_map[$gateway_field_name]] !== '' ) { |
| 539 | + $staged = $this->getData_Staged( $this->var_map[$gateway_field_name] ); |
| 540 | + if ( !is_null( $staged ) ) { |
540 | 541 | //if it was sent, use that. |
541 | | - return $this->postdata[$this->var_map[$gateway_field_name]]; |
| 542 | + return $staged; |
542 | 543 | } else { |
543 | 544 | //return the default for that form value |
544 | 545 | |
— | — | @@ -889,7 +890,7 @@ |
890 | 891 | } |
891 | 892 | |
892 | 893 | // log that the transaction is essentially complete |
893 | | - self::log( $this->getData( 'contribution_tracking_id' ) . " Transaction complete." ); |
| 894 | + self::log( $this->getData_Raw( 'contribution_tracking_id' ) . " Transaction complete." ); |
894 | 895 | |
895 | 896 | //getTransactionStatus works here like this, because it only returns |
896 | 897 | //something other than false if it's the sort of a transaction that can |
— | — | @@ -897,7 +898,7 @@ |
898 | 899 | // $wmfStatus = $this->getTransactionWMFStatus(); |
899 | 900 | // switch ( $wmfStatus ){ |
900 | 901 | // case 'failed' : //only kill their session if they've tried three (or somehow more) times. |
901 | | -// if ( (int)$this->postdata['numAttempt'] < 3 ) { |
| 902 | +// if ( (int)$this->getData_Staged('numAttempt') < 3 ) { |
902 | 903 | // break; |
903 | 904 | // } |
904 | 905 | // case 'complete' : |
— | — | @@ -906,7 +907,7 @@ |
907 | 908 | // $this->unsetAllSessionData(); |
908 | 909 | // } |
909 | 910 | |
910 | | - $this->debugarray[] = 'numAttempt = ' . $this->postdata['numAttempt']; |
| 911 | + $this->debugarray[] = 'numAttempt = ' . $this->getData_Staged('numAttempt'); |
911 | 912 | |
912 | 913 | return $this->getTransactionAllResults(); |
913 | 914 | |
— | — | @@ -1072,15 +1073,15 @@ |
1073 | 1074 | $results = array(); |
1074 | 1075 | |
1075 | 1076 | while ( $i++ <= 3 ) { |
1076 | | - self::log( $this->getData( 'contribution_tracking_id' ) . ' Preparing to send transaction to ' . self::getGatewayName() ); |
| 1077 | + self::log( $this->getData_Raw( 'contribution_tracking_id' ) . ' Preparing to send transaction to ' . self::getGatewayName() ); |
1077 | 1078 | $results['result'] = curl_exec( $ch ); |
1078 | 1079 | $results['headers'] = curl_getinfo( $ch ); |
1079 | 1080 | |
1080 | 1081 | if ( $results['headers']['http_code'] != 200 && $results['headers']['http_code'] != 403 ) { |
1081 | | - self::log( $this->getData( 'contribution_tracking_id' ) . ' Failed sending transaction to ' . self::getGatewayName() . ', retrying' ); |
| 1082 | + self::log( $this->getData_Raw( 'contribution_tracking_id' ) . ' Failed sending transaction to ' . self::getGatewayName() . ', retrying' ); |
1082 | 1083 | sleep( 1 ); |
1083 | 1084 | } elseif ( $results['headers']['http_code'] == 200 || $results['headers']['http_code'] == 403 ) { |
1084 | | - self::log( $this->getData( 'contribution_tracking_id' ) . ' Finished sending transaction to ' . self::getGatewayName() ); |
| 1085 | + self::log( $this->getData_Raw( 'contribution_tracking_id' ) . ' Finished sending transaction to ' . self::getGatewayName() ); |
1085 | 1086 | break; |
1086 | 1087 | } |
1087 | 1088 | } |
— | — | @@ -1092,7 +1093,7 @@ |
1093 | 1094 | //TODO: i18n here! |
1094 | 1095 | //TODO: But also, fire off some kind of "No response from the gateway" thing to somebody so we know right away. |
1095 | 1096 | $results['message'] = 'No response from ' . self::getGatewayName() . '. Please try again later!'; |
1096 | | - self::log( $this->getData( 'contribution_tracking_id' ) . ' No response from ' . self::getGatewayName() . ': ' . curl_error( $ch ) ); |
| 1097 | + self::log( $this->getData_Raw( 'contribution_tracking_id' ) . ' No response from ' . self::getGatewayName() . ': ' . curl_error( $ch ) ); |
1097 | 1098 | curl_close( $ch ); |
1098 | 1099 | return false; |
1099 | 1100 | } |
— | — | @@ -1392,7 +1393,7 @@ |
1393 | 1394 | 'gateway_txn_id' => $this->getTransactionGatewayTxnID(), |
1394 | 1395 | //'language' => '', |
1395 | 1396 | ); |
1396 | | - $transaction += $this->getDisplayData(); |
| 1397 | + $transaction += $this->getData_Raw(); |
1397 | 1398 | |
1398 | 1399 | try { |
1399 | 1400 | wfRunHooks( $hook, array( $transaction ) ); |
— | — | @@ -1404,9 +1405,10 @@ |
1405 | 1406 | function smooshVarsForStaging() { |
1406 | 1407 | |
1407 | 1408 | foreach ( $this->staged_vars as $field ) { |
1408 | | - if ( !array_key_exists( $field, $this->postdata ) || empty( $this->postdata[$field] ) ) { |
| 1409 | + $val = $this->getData_Staged( $field ); |
| 1410 | + if ( is_null( $val ) or $val === '' ) { |
1409 | 1411 | if ( array_key_exists( $field, $this->postdatadefaults ) ) { |
1410 | | - $this->postdata[$field] = $this->postdatadefaults[$field]; |
| 1412 | + $this->staged_data[$field] = $this->postdatadefaults[$field]; |
1411 | 1413 | } |
1412 | 1414 | } |
1413 | 1415 | //what do we do in the event that we're still nothing? (just move on.) |
— | — | @@ -1445,7 +1447,7 @@ |
1446 | 1448 | } |
1447 | 1449 | |
1448 | 1450 | function getPaypalRedirectURL() { |
1449 | | - $currency = $this->getData( 'currency' ); |
| 1451 | + $currency = $this->getData_Raw( 'currency' ); |
1450 | 1452 | |
1451 | 1453 | // update the utm source to set the payment instrument to pp rather than cc |
1452 | 1454 | $data['payment_method'] = 'pp'; |
— | — | @@ -1457,7 +1459,7 @@ |
1458 | 1460 | //update contribution tracking |
1459 | 1461 | $this->dataObj->updateContributionTracking( true ); |
1460 | 1462 | |
1461 | | - $ret = self::getGlobal( "PaypalURL" ) . "/" . $this->postdata['language'] . "?gateway=paypal&" . http_build_query( $this->getPaypalData() ); |
| 1463 | + $ret = self::getGlobal( "PaypalURL" ) . "/" . $this->staged_data['language'] . "?gateway=paypal&" . http_build_query( $this->getPaypalData() ); |
1462 | 1464 | self::log( $ret ); |
1463 | 1465 | return $ret; |
1464 | 1466 | } |
— | — | @@ -1495,9 +1497,9 @@ |
1496 | 1498 | ); |
1497 | 1499 | $ret = array(); |
1498 | 1500 | foreach ( $paypalkeys as $key ){ |
1499 | | - $val = $this->getDisplayData( $key ); |
| 1501 | + $val = $this->getData_Raw( $key ); |
1500 | 1502 | if (!is_null( $val )){ |
1501 | | - $ret[$key] = $this->getDisplayData( $key ); |
| 1503 | + $ret[$key] = $this->getData_Raw( $key ); |
1502 | 1504 | } |
1503 | 1505 | } |
1504 | 1506 | return $ret; |
— | — | @@ -1735,9 +1737,9 @@ |
1736 | 1738 | */ |
1737 | 1739 | function runPreProcessHooks() { |
1738 | 1740 | // allow any external validators to have their way with the data |
1739 | | - self::log( $this->getData( 'contribution_tracking_id' ) . " Preparing to query MaxMind" ); |
| 1741 | + self::log( $this->getData_Raw( 'contribution_tracking_id' ) . " Preparing to query MaxMind" ); |
1740 | 1742 | wfRunHooks( 'GatewayValidate', array( &$this ) ); |
1741 | | - self::log( $this->getData( 'contribution_tracking_id' ) . ' Finished querying Maxmind' ); |
| 1743 | + self::log( $this->getData_Raw( 'contribution_tracking_id' ) . ' Finished querying Maxmind' ); |
1742 | 1744 | |
1743 | 1745 | //DO NOT set some variable as getValidationAction() here, and keep |
1744 | 1746 | //checking that. getValidationAction could change with each one of these |
— | — | @@ -1806,9 +1808,9 @@ |
1807 | 1809 | |
1808 | 1810 | /** |
1809 | 1811 | * Instead of pulling all the DonationData back through to update one local |
1810 | | - * value, use this. It updates both postdata (which is intended to be |
1811 | | - * staged for the gateway) and displaydata (which could potentially become |
1812 | | - * staged for the user). |
| 1812 | + * value, use this. It updates both staged_data (which is intended to be |
| 1813 | + * staged and used _just_ by the gateway) and raw_data, which is actually |
| 1814 | + * just normalized and sanitized form data as entered by the user. |
1813 | 1815 | * |
1814 | 1816 | * TODO: handle the cases where $val is listed in the gateway adapter's |
1815 | 1817 | * staged_vars. |
— | — | @@ -1821,11 +1823,11 @@ |
1822 | 1824 | function refreshGatewayValueFromSource( $val ) { |
1823 | 1825 | $refreshed = $this->dataObj->getVal( $val ); |
1824 | 1826 | if ( !is_null($refreshed) ){ |
1825 | | - $this->postdata[$val] = $refreshed; |
1826 | | - $this->displaydata[$val] = $refreshed; |
| 1827 | + $this->staged_data[$val] = $refreshed; |
| 1828 | + $this->raw_data[$val] = $refreshed; |
1827 | 1829 | } else { |
1828 | | - unset( $this->postdata[$val] ); |
1829 | | - unset( $this->displaydata[$val] ); |
| 1830 | + unset( $this->staged_data[$val] ); |
| 1831 | + unset( $this->raw_data[$val] ); |
1830 | 1832 | } |
1831 | 1833 | } |
1832 | 1834 | |
Index: trunk/extensions/DonationInterface/gateway_common/donation.api.php |
— | — | @@ -44,7 +44,7 @@ |
45 | 45 | $this->dieUsage( "Invalid gateway <<<$gateway>>> passed to Donation API.", 'unknown_gateway' ); |
46 | 46 | } |
47 | 47 | |
48 | | - //$normalizedData = $gatewayObj->getData(); |
| 48 | + //$normalizedData = $gatewayObj->getData_Raw(); |
49 | 49 | $outputResult = array(); |
50 | 50 | $outputResult['message'] = $result['message']; |
51 | 51 | $outputResult['status'] = $result['status']; |
Index: trunk/extensions/DonationInterface/gateway_common/GatewayForm.php |
— | — | @@ -77,7 +77,7 @@ |
78 | 78 | */ |
79 | 79 | public function validateForm( &$error, $options = array() ) { |
80 | 80 | |
81 | | - $data = $this->adapter->getDisplayData(); |
| 81 | + $data = $this->adapter->getData_Raw(); |
82 | 82 | |
83 | 83 | extract( $options ); |
84 | 84 | |