PayWithAmazon\ClientTest::testCloseAuthorization PHP Method

testCloseAuthorization() public method

    public function testCloseAuthorization()
    {
        $client = new Client($this->configParams);
        $fieldMappings = array('merchant_id' => 'SellerId', 'amazon_authorization_id' => 'AmazonAuthorizationId', 'closure_reason' => 'ClosureReason', 'mws_auth_token' => 'MWSAuthToken');
        $action = 'CloseAuthorization';
        $parameters = $this->setParametersAndPost($fieldMappings, $action);
        $expectedParameters = $parameters['expectedParameters'];
        $apiCallParams = $parameters['apiCallParams'];
        $expectedStringParams = $this->callPrivateMethod($client, 'calculateSignatureAndParametersToString', $expectedParameters);
        $response = $client->CloseAuthorization($apiCallParams);
        $apiParametersString = $client->getParameters();
        $this->assertEquals($apiParametersString, $expectedStringParams);
    }