src/Amadeus/Client/Struct/Fop/MopDescription.php
protected function loadMopInformation(MopInfo $options)
    {
        if (!empty($options->mopPaymentType)) {
            $this->checkAndCreateMopInformation();
            $this->paymentModule->mopInformation->fopInformation = new FopInformation($options->mopPaymentType);
        }

        if (!empty($options->creditCardInfo)) {
            $this->checkAndCreateMopInformation();
            $this->paymentModule->mopInformation->creditCardData = new CreditCardData($options->creditCardInfo);
            if ($this->checkAnyNotEmpty(
                $options->creditCardInfo->approvalCode,
                $options->creditCardInfo->threeDSecure
            )
            ) {
                $this->checkAndCreateMopDetailedData($options->fopType);
                $this->paymentModule->mopDetailedData->creditCardDetailedData = new CreditCardDetailedData(
                    $options->creditCardInfo->approvalCode,
                    $options->creditCardInfo->sourceOfApproval,
                    $options->creditCardInfo->threeDSecure
                );
            }
        }

        if (!empty($options->invoiceInfo)) {
            $this->checkAndCreateMopInformation();
            $this->paymentModule->mopInformation->invoiceDataGroup = new InvoiceDataGroup($options->invoiceInfo);
        }
    }
protected function loadMopInformation(MopInfo $options)
    {
        if (!empty($options->mopPaymentType)) {
            $this->checkAndCreateMopInformation();
            $this->paymentModule->mopInformation->fopInformation = new FopInformation($options->mopPaymentType);
        }

        if (!empty($options->creditCardInfo)) {
            $this->checkAndCreateMopInformation();
            $this->paymentModule->mopInformation->creditCardData = new CreditCardData($options->creditCardInfo);
            if ($this->checkAnyNotEmpty(
                $options->creditCardInfo->approvalCode,
                $options->creditCardInfo->threeDSecure
            )
            ) {
                $this->checkAndCreateMopDetailedData($options->fopType);
                $this->paymentModule->mopDetailedData->creditCardDetailedData = new CreditCardDetailedData(
                    $options->creditCardInfo->approvalCode,
                    $options->creditCardInfo->sourceOfApproval,
                    $options->creditCardInfo->threeDSecure
                );
            }
        }

        if (!empty($options->invoiceInfo)) {
            $this->checkAndCreateMopInformation();
            $this->paymentModule->mopInformation->invoiceDataGroup = new InvoiceDataGroup($options->invoiceInfo);
        }
    }
protected function loadMopInformation ( MopInfo $ options ) { if ( ! empty ( $ options -> mopPaymentType ) ) { $ this -> checkAndCreateMopInformation ( ) ; $ this -> paymentModule -> mopInformation -> fopInformation = new FopInformation ( $ options -> mopPaymentType ) ; } if ( ! empty ( $ options -> creditCardInfo ) ) { $ this -> checkAndCreateMopInformation ( ) ; $ this -> paymentModule -> mopInformation -> creditCardData = new CreditCardData ( $ options -> creditCardInfo ) ; if ( $ this -> checkAnyNotEmpty ( $ options -> creditCardInfo -> approvalCode , $ options -> creditCardInfo -> threeDSecure ) ) { $ this -> checkAndCreateMopDetailedData ( $ options -> fopType ) ; $ this -> paymentModule -> mopDetailedData -> creditCardDetailedData = new CreditCardDetailedData ( $ options -> creditCardInfo -> approvalCode , $ options -> creditCardInfo -> sourceOfApproval , $ options -> creditCardInfo -> threeDSecure ) ; } } if ( ! empty ( $ options -> invoiceInfo ) ) { $ this -> checkAndCreateMopInformation ( ) ; $ this -> paymentModule -> mopInformation -> invoiceDataGroup = new InvoiceDataGroup ( $ options -> invoiceInfo ) ; } }
Load MopInformation

@param MopInfo $options
Load MopInformation