lib/custom/src/MShop/Service/Provider/Payment/OmniPay.php
protected function saveRepayData( \Omnipay\Common\Message\ResponseInterface $response, $customerId )
	{
		$data = [];

		if( method_exists( $response, 'getCardReference' ) ) {
			$data['token'] = $response->getCardReference();
		}

		if( method_exists( $response, 'getExpiryMonth' ) ) {
			$data['month'] = $response->getExpiryMonth();
		}

		if( method_exists( $response, 'getExpiryYear' ) ) {
			$data['year'] = $response->getExpiryYear();
		}

		if( !empty( $data ) ) {
			$this->setCustomerData( $customerId, 'repay', $data );
		}
	}
protected function saveRepayData( \Omnipay\Common\Message\ResponseInterface $response, $customerId )
	{
		$data = [];

		if( method_exists( $response, 'getCardReference' ) ) {
			$data['token'] = $response->getCardReference();
		}

		if( method_exists( $response, 'getExpiryMonth' ) ) {
			$data['month'] = $response->getExpiryMonth();
		}

		if( method_exists( $response, 'getExpiryYear' ) ) {
			$data['year'] = $response->getExpiryYear();
		}

		if( !empty( $data ) ) {
			$this->setCustomerData( $customerId, 'repay', $data );
		}
	}
protected function saveRepayData ( \ Omnipay \ Common \ Message \ ResponseInterface $ response , $ customerId ) { $ data = [ ] ; if ( method_exists ( $ response , 'getCardReference' ) ) { $ data [ 'token' ] = $ response -> getCardReference ( ) ; } if ( method_exists ( $ response , 'getExpiryMonth' ) ) { $ data [ 'month' ] = $ response -> getExpiryMonth ( ) ; } if ( method_exists ( $ response , 'getExpiryYear' ) ) { $ data [ 'year' ] = $ response -> getExpiryYear ( ) ; } if ( ! empty ( $ data ) ) { $ this -> setCustomerData ( $ customerId , 'repay' , $ data ) ; } }
Saves the required data for recurring payments in the customer profile

@param \Omnipay\Common\Message\ResponseInterface $response Omnipay response object
@param string $customerId Unique customer ID
Saves the required data for recurring payments in the customer profile