Ejemplo n.º 1
0
        public static List <Payment> FetchAllPaymentsFromVa()
        {
            VirtualAccount va = VirtualAccountCreateTest();

            VirtualAccount va1 = new VirtualAccount((string)va["id"]);

            return(va1.Payments());
        }
Ejemplo n.º 2
0
        public void TestGetAllPaymentsForVirtualAccount()
        {
            string         filepath           = "dummy_virtual_account.json";
            string         url                = string.Format("{0}/{1}", virtualAccountURL, VIRTUALACCOUNTID);
            Client         client             = new Client(ACCESSID, SECRETKEY, Helper.GetMockRequestFactory(filepath, url));
            VirtualAccount virtualAccount     = client.VirtualAccount.Retrieve(VIRTUALACCOUNTID);
            string         expectedJsonString = Helper.GetJsonString(filepath);

            Helper.AssertEntity(virtualAccount, expectedJsonString);

            string filepath2    = "dummy_payment_collection.json";
            string payments_url = string.Format("{0}/payments", url);

            client = new Client(ACCESSID, SECRETKEY, Helper.GetMockRequestFactory(filepath2, payments_url));
            var result = virtualAccount.Payments();

            expectedJsonString = Helper.GetJsonString(filepath2);
            Helper.AssertEntity(result, expectedJsonString);
        }