PluginProbe
PayPlug for WooCommerce (Official) / 1.2.5
PayPlug for WooCommerce (Official) v1.2.5
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
payplug / vendor / payplug / payplug-php / lib / Payplug / Refund.php

Refund.php in PayPlug for WooCommerce (Official) 1.2.5, at vendor/payplug/payplug-php/lib/Payplug/Refund.php

54 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Payplug;
3
4 /**
5 * The Refund DAO simplifies the access to most useful methods
6 **/
7 class Refund {
8 /**
9 * Creates a refund on a payment.
10 *
11 * @param string|Payment $payment the payment id or the payment object
12 * @param array $data API data for refund
13 * @param Payplug $payplug the client configuration
14 *
15 * @return null|Refund the refund object
16 * @throws Exception\ConfigurationNotSetException
17 */
18 public static function create($payment, array $data = null, Payplug $payplug = null)
19 {
20 return Resource\Refund::create($payment, $data, $payplug);
21 }
22
23 /**
24 * Retrieves a refund object on a payment.
25 *
26 * @param string|Payment $payment the payment id or the payment object
27 * @param string $refundId the refund id
28 * @param Payplug $payplug the client configuration
29 *
30 * @return null|Resource\APIResource|Refund the refund object
31 *
32 * @throws Exception\ConfigurationNotSetException
33 */
34 public static function retrieve($payment, $refundId, Payplug $payplug = null)
35 {
36 return Resource\Refund::retrieve($payment, $refundId, $payplug);
37 }
38
39 /**
40 * Lists the last refunds of a payment.
41 *
42 * @param string|Payment $payment the payment id or the payment object
43 * @param Payplug $payplug the client configuration
44 *
45 * @return null|Refund[] an array containing the refunds on success.
46 *
47 * @throws Exception\ConfigurationNotSetException
48 * @throws Exception\UnexpectedAPIResponseException
49 */
50 public static function listRefunds($payment, Payplug $payplug = null)
51 {
52 return Resource\Refund::listRefunds($payment, $payplug);
53 }
54 }