src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
private function _convertAuthorize($request) {
        
        $parameters = array();
        $parameters['Action'] = 'Authorize';
        if ($request->isSetSellerId()) {
            $parameters['SellerId'] =  $request->getSellerId();
        }
        if ($request->isSetAmazonOrderReferenceId()) {
            $parameters['AmazonOrderReferenceId'] =  $request->getAmazonOrderReferenceId();
        }
        if ($request->isSetAuthorizationReferenceId()) {
            $parameters['AuthorizationReferenceId'] =  $request->getAuthorizationReferenceId();
        }
        if ($request->isSetAuthorizationAmount()) {
            $authorizationAmount = $request->getAuthorizationAmount();
            if ($authorizationAmount->isSetAmount()) {
                $parameters['AuthorizationAmount' . '.' . 'Amount'] =  $authorizationAmount->getAmount();
            }
            if ($authorizationAmount->isSetCurrencyCode()) {
                $parameters['AuthorizationAmount' . '.' . 'CurrencyCode'] =  $authorizationAmount->getCurrencyCode();
            }
        }
        if ($request->isSetSellerAuthorizationNote()) {
            $parameters['SellerAuthorizationNote'] =  $request->getSellerAuthorizationNote();
        }
        if ($request->isSetOrderItemCategories()) {
            $orderItemCategories = $request->getOrderItemCategories();
            foreach  ($orderItemCategories->getOrderItemCategory() as $orderItemCategoryIndex => $orderItemCategory) {
                $parameters['OrderItemCategories' . '.' . 'OrderItemCategory' . '.'  . ($orderItemCategoryIndex + 1)] =  $orderItemCategory;
            }
        }
        if ($request->isSetTransactionTimeout()) {
            $parameters['TransactionTimeout'] =  $request->getTransactionTimeout();
        }
        if ($request->isSetCaptureNow()) {
            $parameters['CaptureNow'] =  $request->getCaptureNow() ? "true" : "false";
        }
        if ($request->isSetSoftDescriptor()) {
            $parameters['SoftDescriptor'] =  $request->getSoftDescriptor();
        }

        return $parameters;
    }
private function _convertAuthorize($request) {
        
        $parameters = array();
        $parameters['Action'] = 'Authorize';
        if ($request->isSetSellerId()) {
            $parameters['SellerId'] =  $request->getSellerId();
        }
        if ($request->isSetAmazonOrderReferenceId()) {
            $parameters['AmazonOrderReferenceId'] =  $request->getAmazonOrderReferenceId();
        }
        if ($request->isSetAuthorizationReferenceId()) {
            $parameters['AuthorizationReferenceId'] =  $request->getAuthorizationReferenceId();
        }
        if ($request->isSetAuthorizationAmount()) {
            $authorizationAmount = $request->getAuthorizationAmount();
            if ($authorizationAmount->isSetAmount()) {
                $parameters['AuthorizationAmount' . '.' . 'Amount'] =  $authorizationAmount->getAmount();
            }
            if ($authorizationAmount->isSetCurrencyCode()) {
                $parameters['AuthorizationAmount' . '.' . 'CurrencyCode'] =  $authorizationAmount->getCurrencyCode();
            }
        }
        if ($request->isSetSellerAuthorizationNote()) {
            $parameters['SellerAuthorizationNote'] =  $request->getSellerAuthorizationNote();
        }
        if ($request->isSetOrderItemCategories()) {
            $orderItemCategories = $request->getOrderItemCategories();
            foreach  ($orderItemCategories->getOrderItemCategory() as $orderItemCategoryIndex => $orderItemCategory) {
                $parameters['OrderItemCategories' . '.' . 'OrderItemCategory' . '.'  . ($orderItemCategoryIndex + 1)] =  $orderItemCategory;
            }
        }
        if ($request->isSetTransactionTimeout()) {
            $parameters['TransactionTimeout'] =  $request->getTransactionTimeout();
        }
        if ($request->isSetCaptureNow()) {
            $parameters['CaptureNow'] =  $request->getCaptureNow() ? "true" : "false";
        }
        if ($request->isSetSoftDescriptor()) {
            $parameters['SoftDescriptor'] =  $request->getSoftDescriptor();
        }

        return $parameters;
    }
private function _convertAuthorize ( $ request ) { $ parameters = array ( ) ; $ parameters [ 'Action' ] = 'Authorize' ; if ( $ request -> isSetSellerId ( ) ) { $ parameters [ 'SellerId' ] = $ request -> getSellerId ( ) ; } if ( $ request -> isSetAmazonOrderReferenceId ( ) ) { $ parameters [ 'AmazonOrderReferenceId' ] = $ request -> getAmazonOrderReferenceId ( ) ; } if ( $ request -> isSetAuthorizationReferenceId ( ) ) { $ parameters [ 'AuthorizationReferenceId' ] = $ request -> getAuthorizationReferenceId ( ) ; } if ( $ request -> isSetAuthorizationAmount ( ) ) { $ authorizationAmount = $ request -> getAuthorizationAmount ( ) ; if ( $ authorizationAmount -> isSetAmount ( ) ) { $ parameters [ 'AuthorizationAmount' . '.' . 'Amount' ] = $ authorizationAmount -> getAmount ( ) ; } if ( $ authorizationAmount -> isSetCurrencyCode ( ) ) { $ parameters [ 'AuthorizationAmount' . '.' . 'CurrencyCode' ] = $ authorizationAmount -> getCurrencyCode ( ) ; } } if ( $ request -> isSetSellerAuthorizationNote ( ) ) { $ parameters [ 'SellerAuthorizationNote' ] = $ request -> getSellerAuthorizationNote ( ) ; } if ( $ request -> isSetOrderItemCategories ( ) ) { $ orderItemCategories = $ request -> getOrderItemCategories ( ) ; foreach ( $ orderItemCategories -> getOrderItemCategory ( ) as $ orderItemCategoryIndex => $ orderItemCategory ) { $ parameters [ 'OrderItemCategories' . '.' . 'OrderItemCategory' . '.' . ( $ orderItemCategoryIndex + 1 ) ] = $ orderItemCategory ; } } if ( $ request -> isSetTransactionTimeout ( ) ) { $ parameters [ 'TransactionTimeout' ] = $ request -> getTransactionTimeout ( ) ; } if ( $ request -> isSetCaptureNow ( ) ) { $ parameters [ 'CaptureNow' ] = $ request -> getCaptureNow ( ) ? "true" : "false" ; } if ( $ request -> isSetSoftDescriptor ( ) ) { $ parameters [ 'SoftDescriptor' ] = $ request -> getSoftDescriptor ( ) ; } return $ parameters ; }
Convert AuthorizeRequest to name value pairs
Convert AuthorizeRequest to name value pairs