- 23, Feb 2014
- #1
1. Заходим сюда: ваш_скрипт\application\helpers\qiwi_helper.php
2. Удаляем все содержание данного файла и вставляем данный код:
2. Удаляем все содержание данного файла и вставляем данный код:
<?php
if
( ! defined(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
require
(
'qiwi-class.php'
);
function
qiwi_pay(
$qiwi_num
,
$qiwi_pass
,
$bill
,
$price
,
$stat
) {
$qiwi
=
new
QIWI_LazyPay(
$qiwi_num
,
$qiwi_pass
);
$date1
= date(
'd.m.Y'
,strtotime(
'-1 day'
));
$date2
= date(
'd.m.Y'
,strtotime(
'+1 day'
));
$operations
=
$qiwi
->GetHistory(
$date1
,
$date2
);
foreach
(
$operations
as
$operation
) {
if
(number_format(
$operation
[
'dAmount'
],
2
,
'.'
,
''
) ==
$price
& &
$operation
[
'sComment'
] ==
$bill
& &
$operation
[
'sStatus'
] ==
$stat
) {
return
1
; } } }
function
check_qiwi(
$qiwi_num
,
$qiwi_pass
) {
try
{
$qiwi
=
new
QIWI_LazyPay(
$qiwi_num
,
$qiwi_pass
); }
catch
(
Exception
$e
) {
die
(
$e
->getMessage()); } }
?>
if
( ! defined(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
require
(
'qiwi-class.php'
);
function
qiwi_pay(
$qiwi_num
,
$qiwi_pass
,
$bill
,
$price
,
$stat
) {
$qiwi
=
new
QIWI_LazyPay(
$qiwi_num
,
$qiwi_pass
);
$date1
= date(
'd.m.Y'
,strtotime(
'-1 day'
));
$date2
= date(
'd.m.Y'
,strtotime(
'+1 day'
));
$operations
=
$qiwi
->GetHistory(
$date1
,
$date2
);
foreach
(
$operations
as
$operation
) {
if
(number_format(
$operation
[
'dAmount'
],
2
,
'.'
,
''
) ==
$price
& &
$operation
[
'sComment'
] ==
$bill
& &
$operation
[
'sStatus'
] ==
$stat
) {
return
1
; } } }
function
check_qiwi(
$qiwi_num
,
$qiwi_pass
) {
try
{
$qiwi
=
new
QIWI_LazyPay(
$qiwi_num
,
$qiwi_pass
); }
catch
(
Exception
$e
) {
die
(
$e
->getMessage()); } }
?>