PluginProbe
PayPlug for WooCommerce (Official) / 3.1.0
PayPlug for WooCommerce (Official) v3.1.0
3.1.0 3.0.0 2.18.0 1.0.17 1.0.18 1.0.19 1.0.20 1.0.21 1.0.22 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.1.0 1.10.0 1.10.1 1.2.1 1.2.10 1.2.11 1.2.2 1.2.3 1.2.4 1.2.5 All 102 releases
← All changes | vendor/payplug/payplug-php/lib/Payplug/Payment.php +20 -4 1.0.3 → 3.1.0 View file →
@@ -15,9 +15,9 @@
15 15 * @return null|Resource\Payment the retrieved payment or null on error
16 16 *
17 17 * @throws Exception\ConfigurationNotSetException
18 18 */
19 - public static function retrieve($paymentId, Payplug $payplug = null)
19 + public static function retrieve($paymentId, $payplug = null)
20 20 {
21 21 return Resource\Payment::retrieve($paymentId, $payplug);
22 22 }
23 23
@@ -30,9 +30,9 @@
30 30 * @return null|Resource\Payment the aborted payment or null on error
31 31 *
32 32 * @throws Exception\ConfigurationNotSetException
33 33 */
34 - public static function abort($paymentId, Payplug $payplug = null)
34 + public static function abort($paymentId, $payplug = null)
35 35 {
36 36 $payment = Resource\Payment::fromAttributes(array('id' => $paymentId));
37 37 return $payment->abort($payplug);
38 38 }
@@ -37,8 +37,24 @@
37 37 return $payment->abort($payplug);
38 38 }
39 39
40 40 /**
41 + * Captures a Payment.
42 + *
43 + * @param string $paymentId the payment ID
44 + * @param Payplug $payplug the client configuration
45 + *
46 + * @return null|Resource\Payment the captured payment or null on error
47 + *
48 + * @throws Exception\ConfigurationNotSetException
49 + */
50 + public static function capture($paymentId, $payplug = null)
51 + {
52 + $payment = Resource\Payment::fromAttributes(array('id' => $paymentId));
53 + return $payment->capture($payplug);
54 + }
55 +
56 + /**
41 57 * Creates a Payment.
42 58 *
43 59 * @param array $data API data for payment creation
44 60 * @param Payplug $payplug the client configuration
@@ -46,9 +62,9 @@
46 62 * @return null|Resource\Payment the created payment instance
47 63 *
48 64 * @throws Exception\ConfigurationNotSetException
49 65 */
50 - public static function create(array $data, Payplug $payplug = null)
66 + public static function create(array $data, $payplug = null)
51 67 {
52 68 return Resource\Payment::create($data, $payplug);
53 69 }
54 70
@@ -63,9 +79,9 @@
63 79 *
64 80 * @throws Exception\InvalidPaymentException
65 81 * @throws Exception\UnexpectedAPIResponseException
66 82 */
67 - public static function listPayments($perPage = null, $page = null, Payplug $payplug = null)
83 + public static function listPayments($perPage = null, $page = null, $payplug = null)
68 84 {
69 85 return Resource\Payment::listPayments($perPage, $page, $payplug);
70 86 }
71 87 };