|
Revision 57, 1.0 kB
(checked in by Matti1979, 4 months ago)
|
Moving admin_info function to payment_app_controller.
Moving product array creation to payment_app_controller.
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
class MobillcashController extends PaymentAppController |
|---|
| 14 |
{ |
|---|
| 15 |
var $name = 'Mobillcash'; |
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
var $defaults = array( |
|---|
| 22 |
'account' => '', |
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
function index() { |
|---|
| 30 |
$payment = $this->get_info(); |
|---|
| 31 |
$data = array( |
|---|
| 32 |
'account' => Configure::read('mobillcash.account'), |
|---|
| 33 |
'amount' => $payment['Order']['total'], |
|---|
| 34 |
'reference' => $payment['Order']['id'], |
|---|
| 35 |
'currency' => $this->get_currency(array ('GBP', 'EUR', 'SEK', 'NOK', 'DKK', 'USD')), |
|---|
| 36 |
'redirect' => $payment['Store']['success_url'], |
|---|
| 37 |
'form_action' => 'https://www.mobillcash.com/pay/', |
|---|
| 38 |
'form_method' => 'get' |
|---|
| 39 |
); |
|---|
| 40 |
$this->set(compact('data')); |
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
?> |
|---|