Skip to content

Commit

Permalink
added init.php which creates a route depending on driver
Browse files Browse the repository at this point in the history
  • Loading branch information
Michał Matyas committed May 23, 2011
1 parent e34f334 commit 8f89f43
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
6 changes: 3 additions & 3 deletions classes/payment/driver/dotpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* W ustawieniach punktu płatności trzeba ustawić następujące adresy:
*
* URL: http://<domena>/index.php/payment_dotpay/return
* URLC: http://<domena>/index.php/payment_dotpay/status
* URL: http://<domena>/index.php/payment/return
* URLC: http://<domena>/index.php/payment/status
*
*/

Expand Down Expand Up @@ -152,4 +152,4 @@ private function _check_control($control) {
return ($control == md5(implode(':',$data)));
}

}
}
8 changes: 4 additions & 4 deletions classes/payment/driver/platnoscipl.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*
* W ustawieniach punktu płatności trzeba ustawić następujące adresy:
*
* UrlOnline: http://<domena>/index.php/payment_platnoscipl/online
* UrlPoprawny: http://<domena>/index.php/payment_platnoscipl/success?pos_id=%posId%&session_id=%sessionId%
* UrlBledny: http://<domena>/index.php/payment_platnoscipl/fail?pos_id=%posId%&session_id=%sessionId%&error=%error%
* UrlOnline: http://<domena>/index.php/payment/online
* UrlPoprawny: http://<domena>/index.php/payment/success?pos_id=%posId%&session_id=%sessionId%
* UrlBledny: http://<domena>/index.php/payment/fail?pos_id=%posId%&session_id=%sessionId%&error=%error%
*
*/

Expand Down Expand Up @@ -241,4 +241,4 @@ private function _check_sig($sig, $data = array()) {
return ($sig == md5(implode('',$data).$this->_pos_data['key2']));
}

}
}
7 changes: 7 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

Route::set('payment', 'payment(/<action>)')
->defaults(array(
'controller' => "payment_".Kohana::config('payment.driver'),
'action' => 'index',
));

0 comments on commit 8f89f43

Please sign in to comment.