src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExampleCLI.php
private function _calculatePaymentAmountBasedOnBuyerDestinationAddress ()
    {
        $response = $this->callStepAndCheckForException('getBillingAgreementDetails');
        printGetBillingAgreementDetailsResponse($response);
        
        $orderTotalPreTaxAndShipping = $this->_getPreTaxAndShippingOrderAmountFromStdIn();
        $shippingType = $this->_getShippingTypeFromStdIn();
        
        return $this->exampleClass->calculatePaymentAmountBasedOnBuyerDetails(
                $response->getGetBillingAgreementDetailsResult()
                    ->getBillingAgreementDetails(), $orderTotalPreTaxAndShipping, $shippingType);
    }
private function _calculatePaymentAmountBasedOnBuyerDestinationAddress ()
    {
        $response = $this->callStepAndCheckForException('getBillingAgreementDetails');
        printGetBillingAgreementDetailsResponse($response);
        
        $orderTotalPreTaxAndShipping = $this->_getPreTaxAndShippingOrderAmountFromStdIn();
        $shippingType = $this->_getShippingTypeFromStdIn();
        
        return $this->exampleClass->calculatePaymentAmountBasedOnBuyerDetails(
                $response->getGetBillingAgreementDetailsResult()
                    ->getBillingAgreementDetails(), $orderTotalPreTaxAndShipping, $shippingType);
    }
private function _calculatePaymentAmountBasedOnBuyerDestinationAddress ( ) { $ response = $ this -> callStepAndCheckForException ( 'getBillingAgreementDetails' ) ; printGetBillingAgreementDetailsResponse ( $ response ) ; $ orderTotalPreTaxAndShipping = $ this -> _getPreTaxAndShippingOrderAmountFromStdIn ( ) ; $ shippingType = $ this -> _getShippingTypeFromStdIn ( ) ; return $ this -> exampleClass -> calculatePaymentAmountBasedOnBuyerDetails ( $ response -> getGetBillingAgreementDetailsResult ( ) -> getBillingAgreementDetails ( ) , $ orderTotalPreTaxAndShipping , $ shippingType ) ; }
Retreive the current information about the billing agreement as indicated
by the buyer and calculate amount for each payment to charge, based on
address destination state and country

@return string total amount for the order that the merchant will charge
the buyer
Retreive the current information about the billing agreement as indicated by the buyer and calculate amount for each payment to charge based on address destination state and country