invoices.php
983 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
class Flora_Api_Service_Invoices extends Flora_Api_Service
{
const API_INVOICE_BYKEY = "invoices/invoice";
const API_INVOICE_PROCESS = "invoices/process";
const API_ORDER_BYKEY = "invoices/order";
/**
* @param $id
* @return Flora_Model_Shop_Order_Invoice
*/
public function getInvoiceByKey($id)
{
return $this->call(self::API_INVOICE_BYKEY, array("id" => $id));
}
/**
* @param $id int
* @param $amount float
* @param $data mixed|array
* @return bool
*/
public function processInvoiceById($id, $paysystem_id, $amount, $data)
{
return $this->call(self::API_INVOICE_PROCESS, array(
"id" => $id, 'paysystem_id' => $paysystem_id, 'amount' => $amount
), $data);
}
/**
* @param $id
* @return Flora_Model_Shop_Order
*/
public function getOrderByKey($id)
{
return $this->call(self::API_ORDER_BYKEY, array("id" => $id));
}
}