src/gateways/Gateway.php
private function _createSubscriptionPayment(array $data, Currency $currency): SubscriptionPayment
    {
        $payment = new SubscriptionPayment([
            'paymentAmount' => $data['amount_due'] / (10 ** $currency->minorUnit),
            'paymentCurrency' => $currency,
            'paymentDate' => $data['date'],
            'paymentReference' => $data['charge'],
            'paid' => $data['paid'],
            'response' => Json::encode($data)
        ]);

        return $payment;
    }
private function _createSubscriptionPayment(array $data, Currency $currency): SubscriptionPayment
    {
        $payment = new SubscriptionPayment([
            'paymentAmount' => $data['amount_due'] / (10 ** $currency->minorUnit),
            'paymentCurrency' => $currency,
            'paymentDate' => $data['date'],
            'paymentReference' => $data['charge'],
            'paid' => $data['paid'],
            'response' => Json::encode($data)
        ]);

        return $payment;
    }
private function _createSubscriptionPayment ( array $ data , Currency $ currency ) : SubscriptionPayment { $ payment = new SubscriptionPayment ( [ 'paymentAmount' => $ data [ 'amount_due' ] / ( 10 ** $ currency -> minorUnit ) , 'paymentCurrency' => $ currency , 'paymentDate' => $ data [ 'date' ] , 'paymentReference' => $ data [ 'charge' ] , 'paid' => $ data [ 'paid' ] , 'response' => Json :: encode ( $ data ) ] ) ; return $ payment ; }
Create a subscription payment model from invoice.

@param array $data
@param Currency $currency the currency used for payment

@return SubscriptionPayment
Create a subscription payment model from invoice .