src/Reconciliation/Bridge/PaypalBridge.php
public function buildChargeFromTransaction( $sTxnID ) {
		$oCharge = new Freeagent\DataWrapper\ChargeVO();

		try {
			$oDets = $this->getTxnChargeDetails( $sTxnID );

			$oCharge->setId( $sTxnID )
					->setGateway( 'paypalexpress' )
					->setPaymentTerms( 1 )
					->setAmount_Gross( $oDets->GrossAmount->value )
					->setAmount_Fee( $oDets->FeeAmount->value )
					->setAmount_Net( $oDets->GrossAmount->value - $oDets->FeeAmount->value )
					->setDate( strtotime( $oDets->PaymentDate ) )
					->setCurrency( $oDets->GrossAmount->currencyID );
		}
		catch ( \Exception $oE ) {
		}

		return $oCharge;
	}
public function buildChargeFromTransaction( $sTxnID ) {
		$oCharge = new Freeagent\DataWrapper\ChargeVO();

		try {
			$oDets = $this->getTxnChargeDetails( $sTxnID );

			$oCharge->setId( $sTxnID )
					->setGateway( 'paypalexpress' )
					->setPaymentTerms( 1 )
					->setAmount_Gross( $oDets->GrossAmount->value )
					->setAmount_Fee( $oDets->FeeAmount->value )
					->setAmount_Net( $oDets->GrossAmount->value - $oDets->FeeAmount->value )
					->setDate( strtotime( $oDets->PaymentDate ) )
					->setCurrency( $oDets->GrossAmount->currencyID );
		}
		catch ( \Exception $oE ) {
		}

		return $oCharge;
	}
public function buildChargeFromTransaction ( $ sTxnID ) { $ oCharge = new Freeagent \ DataWrapper \ ChargeVO ( ) ; try { $ oDets = $ this -> getTxnChargeDetails ( $ sTxnID ) ; $ oCharge -> setId ( $ sTxnID ) -> setGateway ( 'paypalexpress' ) -> setPaymentTerms ( 1 ) -> setAmount_Gross ( $ oDets -> GrossAmount -> value ) -> setAmount_Fee ( $ oDets -> FeeAmount -> value ) -> setAmount_Net ( $ oDets -> GrossAmount -> value - $ oDets -> FeeAmount -> value ) -> setDate ( strtotime ( $ oDets -> PaymentDate ) ) -> setCurrency ( $ oDets -> GrossAmount -> currencyID ) ; } catch ( \ Exception $ oE ) { } return $ oCharge ; }
This needs to be extended to add the Invoice Item details.
@param string $sTxnID a Stripe Charge ID
@return Freeagent\DataWrapper\ChargeVO
@throws \Exception
This needs to be extended to add the Invoice Item details .