Revision #3 has been created by yasen on Dec 22, 2012, 8:22:27 PM with the memo:
pts
« previous (#2)
Changes
Title
unchanged
ePay Integration - Bulgarian Payment Provider
Category
unchanged
Tutorials
Yii version
unchanged
Tags
unchanged
epay, payments, bulgaria
Content
changed
[...]
}
```
Implementation
--------------
1I. In the view script add the following hidden fields:
```php[...]
echo CHtml::hiddenField('URL_CANCEL',Yii::app()->createAbsoluteUrl('order/canceled'));
```
2II. Further down in the same view file we will put JavaScript code that will send request to OrderController::actionCreate() to create the order record in the database and on success we will send another request to OrderController::actionEpayData() to generate the needed data for the hidden fields ENCODING and CHECKSUM.
```php[...]
},'json');
```
3III. In the class OrderController add these methods:
```php[...]
}
```
4IV. Create a file in protected/components/EpayBg.php
```php[...]
}
```
5V. The Order model would start with:
```php
class Order extends CActiveRecord
{
const STATUS_INITIATED = 1;[...]