Completed
Push — master ( 110887...ff6c7f )
by Aimeos
10:07
created

PostPay::repay()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Metaways Infosystems GmbH, 2012
6
 * @copyright Aimeos (aimeos.org), 2015-2017
7
 * @package MShop
8
 * @subpackage Service
9
 */
10
11
12
namespace Aimeos\MShop\Service\Provider\Payment;
13
14
15
/**
16
 * Payment provider for post-paid orders.
17
 *
18
 * @package MShop
19
 * @subpackage Service
20
 */
21
class PostPay
22
	extends \Aimeos\MShop\Service\Provider\Payment\Base
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces between "Base" and comma; 1 found
Loading history...
23
	implements \Aimeos\MShop\Service\Provider\Payment\Iface
24
{
25
	/**
26
	 * Executes the payment again for the given order if supported.
27
	 * This requires support of the payment gateway and token based payment
28
	 *
29
	 * @param \Aimeos\MShop\Order\Item\Iface $order Order invoice object
30
	 * @return void
31
	 */
32
	public function repay( \Aimeos\MShop\Order\Item\Iface $order )
33
	{
34
	}
35
36
37
	/**
38
	 * Updates the orders for whose status updates have been received by the confirmation page
39
	 *
40
	 * @param \Psr\Http\Message\ServerRequestInterface $request Request object with parameters and request body
41
	 * @param \Aimeos\MShop\Order\Item\Iface $order Order item that should be updated
42
	 * @return \Aimeos\MShop\Order\Item\Iface Updated order item
43
	 * @throws \Aimeos\MShop\Service\Exception If updating the orders failed
44
	 */
45
	public function updateSync( \Psr\Http\Message\ServerRequestInterface $request, \Aimeos\MShop\Order\Item\Iface $order )
46
	{
47
		$order->setPaymentStatus( \Aimeos\MShop\Order\Item\Base::PAY_AUTHORIZED );
48
		$this->saveOrder( $order );
49
50
		return $order;
51
	}
52
}