public void GetPaymentToken()
        {
            IRetrievePaymentToken client = ClientModuleIntegrationTestingUtilities.GetSandboxedLevelUpModule <IRetrievePaymentToken>();
            var paymentToken             = client.GetPaymentToken(ClientModuleIntegrationTestingUtilities.SandboxedLevelUpUserAccessToken);

            Assert.IsNotNull(paymentToken);
            Assert.IsTrue(LevelUpTestConfiguration.Current.ConsumerQrData.Contains(paymentToken.Data));
        }
        public void GetPaymentTokenShouldSucceed()
        {
            const string expectedRequestUrl = "https://sandbox.thelevelup.com/v15/payment_token";

            RestResponse expectedResponse = new RestResponse
            {
                StatusCode = HttpStatusCode.OK,
                Content    =
                    "{" +
                    "\"payment_token\": {" +
                    "\"data\": \"LU02000008ZS9OJFUBNEL6ZM\"," +
                    "\"id\": 323" +
                    "}" +
                    "}"
            };

            IRetrievePaymentToken client = ClientModuleUnitTestingUtilities.GetMockedLevelUpModule <IRetrievePaymentToken>(
                expectedResponse, expectedRequestUrl: expectedRequestUrl);
            var paymentToken = client.GetPaymentToken("not_checking_this");

            Assert.AreEqual(paymentToken.Id, 323);
            Assert.AreEqual(paymentToken.Data, "LU02000008ZS9OJFUBNEL6ZM");
        }