public void PayoutOrgDebitNullFundingCustomerId()
        {
            var payoutOrgDebit = new payoutOrgDebit
            {
                id              = "1",
                reportGroup     = "Default Report Group",
                amount          = 1500,
                fundsTransferId = "value for fundsTransferId",
            };

            Assert.Throws <CnpOnlineException>(() => { _cnp.PayoutOrgDebit(payoutOrgDebit); });
        }
        public void PayoutOrgDebitAsyncNullFundingCustomerId()
        {
            var payoutOrgDebit = new payoutOrgDebit
            {
                id              = "1",
                reportGroup     = "Default Report Group",
                amount          = 1500,
                fundsTransferId = "value for fundsTransferId",
            };

            CancellationToken cancellationToken = new CancellationToken(false);

            Assert.Throws <AggregateException>(() => { var _ = _cnp.PayoutOrgDebitAsync(payoutOrgDebit, cancellationToken).Result; });
        }
        public void PayoutOrgDebit()
        {
            var payoutOrgDebit = new payoutOrgDebit
            {
                id                = "1",
                reportGroup       = "Default Report Group",
                amount            = 1500,
                fundingCustomerId = "value for fundingCustomerId",
                fundsTransferId   = "value for fundsTransferId",
            };

            var response = _cnp.PayoutOrgDebit(payoutOrgDebit);

            Assert.AreEqual("000", response.response);
        }
        public void PayoutOrgDebitAsync()
        {
            var payoutOrgDebit = new payoutOrgDebit
            {
                id                = "1",
                reportGroup       = "Default Report Group",
                amount            = 1500,
                fundingCustomerId = "value for fundingCustomerId",
                fundsTransferId   = "value for fundsTransferId",
            };

            CancellationToken cancellationToken = new CancellationToken(false);
            var response = _cnp.PayoutOrgDebitAsync(payoutOrgDebit, cancellationToken);

            Assert.AreEqual("000", response.Result.response);
        }
Esempio n. 5
0
        public void TestAddPayoutOrgDebit()
        {
            var payoutOrgDebit = new payoutOrgDebit();

            payoutOrgDebit.fundingCustomerId = "123456";
            payoutOrgDebit.fundsTransferId   = "123467";
            payoutOrgDebit.amount            = 107L;

            batchRequest.addPayoutOrgDebit(payoutOrgDebit);

            Assert.AreEqual(1, batchRequest.getNumPayoutOrgDebit());
            Assert.AreEqual(107L, batchRequest.getPayoutOrgDebitAmount());
            Assert.AreEqual(
                "\r\n<payoutOrgDebit reportGroup=\"Default Report Group\">\r\n<fundingCustomerId>123456</fundingCustomerId>\r\n<fundsTransferId>123467</fundsTransferId>\r\n<amount>107</amount>\r\n</payoutOrgDebit>",
                payoutOrgDebit.Serialize());

            mockCnpFile.Verify(cnpFile => cnpFile.createRandomFile(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), mockCnpTime.Object));
            mockCnpFile.Verify(cnpFile => cnpFile.AppendLineToFile(mockFilePath, payoutOrgDebit.Serialize()));
        }
Esempio n. 6
0
 public Task <payoutOrgDebitResponse> PayoutOrgDebitAsync(payoutOrgDebit payoutOrgDebit, CancellationToken cancellationToken)
 {
     return(SendRequestAsync(response => response.payoutOrgDebitResponse, payoutOrgDebit, cancellationToken));
 }
Esempio n. 7
0
 public payoutOrgDebitResponse PayoutOrgDebit(payoutOrgDebit payoutOrgDebit)
 {
     return(SendRequest(response => response.payoutOrgDebitResponse, payoutOrgDebit));
 }