Index: branches/fundraising/extensions/DonationInterface/globalcollect_gateway/globalcollect_resultswitcher.body.php |
— | — | @@ -97,6 +97,15 @@ |
98 | 98 | } else { |
99 | 99 | $wgOut->addHTML( "Empty Results" ); |
100 | 100 | } |
| 101 | + if (array_key_exists('Donor', $_SESSION)){ |
| 102 | + $wgOut->addHTML("Session Donor Vars:<ul>"); |
| 103 | + foreach ($_SESSION['Donor'] as $key=>$val){ |
| 104 | + $wgOut->addHTML( "<li>$key: $val" ); |
| 105 | + } |
| 106 | + $wgOut->addHTML("</ul>"); |
| 107 | + } else { |
| 108 | + $wgOut->addHTML("No Session Donor Vars:<ul>"); |
| 109 | + } |
101 | 110 | } |
102 | 111 | |
103 | 112 | /** |
Index: branches/fundraising/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php |
— | — | @@ -115,6 +115,7 @@ |
116 | 116 | } else { // The submitted form data is valid, so process it |
117 | 117 | // allow any external validators to have their way with the data |
118 | 118 | $result = $this->adapter->do_transaction( 'INSERT_ORDERWITHPAYMENT' ); |
| 119 | + $this->adapter->addDonorDataToSession(); |
119 | 120 | //$result = $this->adapter->do_transaction( 'TEST_CONNECTION' ); |
120 | 121 | |
121 | 122 | $this->displayResultsForDebug($result); |
— | — | @@ -227,6 +228,15 @@ |
228 | 229 | } else { |
229 | 230 | $wgOut->addHTML("Empty Results"); |
230 | 231 | } |
| 232 | + if (array_key_exists('Donor', $_SESSION)){ |
| 233 | + $wgOut->addHTML("Session Donor Vars:<ul>"); |
| 234 | + foreach ($_SESSION['Donor'] as $key=>$val){ |
| 235 | + $wgOut->addHTML( "<li>$key: $val" ); |
| 236 | + } |
| 237 | + $wgOut->addHTML("</ul>"); |
| 238 | + } else { |
| 239 | + $wgOut->addHTML("No Session Donor Vars:<ul>"); |
| 240 | + } |
231 | 241 | } |
232 | 242 | |
233 | 243 | /** |
Index: branches/fundraising/extensions/DonationInterface/gateway_common/gateway.adapter.php |
— | — | @@ -619,5 +619,9 @@ |
620 | 620 | //if we walk straight off the end... |
621 | 621 | return null; |
622 | 622 | } |
| 623 | + |
| 624 | + function addDonorDataToSession(){ |
| 625 | + $this->dataObj->addDonorDataToSession(); |
| 626 | + } |
623 | 627 | |
624 | 628 | } |
Index: branches/fundraising/extensions/DonationInterface/gateway_common/DonationData.php |
— | — | @@ -651,6 +651,28 @@ |
652 | 652 | $db->update( 'contribution_tracking', $tracked_contribution, array( 'id' => $this->getVal( 'contribution_tracking_id' ) ) ); |
653 | 653 | } |
654 | 654 | } |
| 655 | + |
| 656 | + public function addDonorDataToSession(){ |
| 657 | + self::ensureSession(); |
| 658 | + $donordata = array( |
| 659 | + 'email', |
| 660 | + 'fname', |
| 661 | + 'mname', |
| 662 | + 'lname', |
| 663 | + 'street', |
| 664 | + 'city', |
| 665 | + 'state', |
| 666 | + 'zip', |
| 667 | + 'country', |
| 668 | + ); |
| 669 | + |
| 670 | + foreach ($donordata as $item){ |
| 671 | + if ($this->isSomething($item)){ |
| 672 | + $_SESSION['Donor'][$item] = $this->getVal($item); |
| 673 | + } |
| 674 | + } |
| 675 | + |
| 676 | + } |
655 | 677 | |
656 | 678 | } |
657 | 679 | |