public function cancel( \Aimeos\MShop\Order\Item\Iface $order )
	{
		$provider = $this->getProvider();

		if( !$provider->supportsVoid() ) {
			return;
		}

		$base = $this->getOrderBase( $order->getBaseId() );

		$data = array(
			'transactionReference' => $this->getTransactionReference( $base ),
			'currency' => $base->getPrice()->getCurrencyId(),
			'amount' => $this->getAmount( $base->getPrice() ),
			'transactionId' => $order->getId(),
		);

		$response = $provider->void( $data )->send();

		if( $response->isSuccessful() )
		{
			$status = \Aimeos\MShop\Order\Item\Base::PAY_CANCELED;
			$order->setPaymentStatus( $status );
			$this->saveOrder( $order );
		}
	}
public function cancel( \Aimeos\MShop\Order\Item\Iface $order )
	{
		$provider = $this->getProvider();

		if( !$provider->supportsVoid() ) {
			return;
		}

		$base = $this->getOrderBase( $order->getBaseId() );

		$data = array(
			'transactionReference' => $this->getTransactionReference( $base ),
			'currency' => $base->getPrice()->getCurrencyId(),
			'amount' => $this->getAmount( $base->getPrice() ),
			'transactionId' => $order->getId(),
		);

		$response = $provider->void( $data )->send();

		if( $response->isSuccessful() )
		{
			$status = \Aimeos\MShop\Order\Item\Base::PAY_CANCELED;
			$order->setPaymentStatus( $status );
			$this->saveOrder( $order );
		}
	}
public function cancel ( \ Aimeos \ MShop \ Order \ Item \ Iface $ order ) { $ provider = $ this -> getProvider ( ) ; if ( ! $ provider -> supportsVoid ( ) ) { return ; } $ base = $ this -> getOrderBase ( $ order -> getBaseId ( ) ) ; $ data = array ( 'transactionReference' => $ this -> getTransactionReference ( $ base ) , 'currency' => $ base -> getPrice ( ) -> getCurrencyId ( ) , 'amount' => $ this -> getAmount ( $ base -> getPrice ( ) ) , 'transactionId' => $ order -> getId ( ) , ) ; $ response = $ provider -> void ( $ data ) -> send ( ) ; if ( $ response -> isSuccessful ( ) ) { $ status = \ Aimeos \ MShop \ Order \ Item \ Base :: PAY_CANCELED ; $ order -> setPaymentStatus ( $ status ) ; $ this -> saveOrder ( $ order ) ; } }
Cancels the authorization for the given order if supported.

@param \Aimeos\MShop\Order\Item\Iface $order Order invoice object
Cancels the authorization for the given order if supported .