-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMethod.php
58 lines (54 loc) · 2.07 KB
/
Method.php
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
namespace Dfe\Qiwi;
# 2017-09-04
final class Method extends \Df\Payment\Method {
/**
* 2017-09-04
* 1) The GitHub-based documentation:
* «The rounding up method depends on the invoice currency» / «Способ округления зависит от валюты».
* https://github.com/QIWI-API/pull-payments-docs/blob/40d48cf0/_pull-payments-api_en.html.md#request--put
* https://github.com/QIWI-API/pull-payments-docs/blob/40d48cf0/_pull-payments-api_ru.html.md#Запрос--put
* 2) The PDF documentation:
* «A positive number rounded up to 2 or 3 decimal places after the comma.»
* «Положительное число, округленное до 2 или 3 знаков после десятичной точки.»
* Format: number(6.3). Regex: ^\d+(.\d{0,3})?$
* «4.2. Creating an Invoice», page 7.
* «4.2. Выставление счета пользователю», страница 7.
* `[QIWI Wallet] The REST API specification (v.2.12)`, https://mage2.pro/t/3745
* [QIWI Wallet] What are the rounding rules for each supported currency? https://mage2.pro/t/4454
* @override
* @see \Df\Payment\Method::amountFormat()
* @used-by \Df\Payment\Operation::amountFormat()
*/
function amountFormat(float $a):string {return dff_2($a);}
/**
* 2017-09-05
* @used-by \Dfe\Qiwi\Charge::pBill()
* @return string|null
*/
function phone() {return $this->iia(self::$II_PHONE);}
/**
* 2017-09-18
* `[QIWI Wallet] What are the minimum and maximum payment amount limitations
* for each payment option and currency?` https://mage2.pro/t/4526
* @override
* @see \Df\Payment\Method::amountLimits()
* @used-by \Df\Payment\Method::isAvailable()
* @return null
*/
protected function amountLimits() {return null;}
/**
* 2017-09-05
* @override
* @see \Df\Payment\Method::iiaKeys()
* @used-by \Df\Payment\Method::assignData()
* @return string[]
*/
protected function iiaKeys():array {return [self::$II_PHONE];}
/**
* 2017-09-05
* @used-by self::iiaKeys()
* @used-by self::phone()
*/
private static $II_PHONE = 'phone';
}