private async Task <PayInCardWebDTO> CreatePayInCardWeb(string authorId, string creditedWalletId, Money debitedFunds, Money fees, string returnURL, CultureCode culture, CardType cardType) { PayInCardWebPostDTO payIn = new PayInCardWebPostDTO(authorId, debitedFunds, fees, creditedWalletId, returnURL, culture, cardType) { SecureMode = SecureMode.FORCE }; var payInCardWeb = await _mangoPayApi.PayIns.CreateCardWeb(payIn); return(payInCardWeb); }
protected PayInCardWebDTO CreateJohnsPayInCardWeb(string walletId) { UserNaturalDTO user = this.GetJohn(); PayInCardWebPostDTO payIn = new PayInCardWebPostDTO(user.Id, new Money { Amount = 1000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, walletId, "https://test.com", CountryIso.FR, CardType.CB_VISA_MASTERCARD); return(this.Api.PayIns.CreateCardWeb(payIn)); }
protected PayInCardWebDTO GetNewPayInCardWeb() { WalletDTO wallet = this.GetJohnsWallet(); UserNaturalDTO user = this.GetJohn(); PayInCardWebPostDTO payIn = new PayInCardWebPostDTO(user.Id, new Money { Amount = 1000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, wallet.Id, "https://test.com", CountryIso.FR, CardType.CB_VISA_MASTERCARD); BaseTest._johnsPayInCardWeb = this.Api.PayIns.CreateCardWeb(payIn); return(BaseTest._johnsPayInCardWeb); }
protected PayInCardWebDTO GetJohnsPayInCardWeb(string walletId) { if (BaseTest._johnsPayInCardWeb == null) { UserNaturalDTO user = this.GetJohn(); PayInCardWebPostDTO payIn = new PayInCardWebPostDTO(user.Id, new Money { Amount = 1000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, walletId, "https://test.com", CultureCode.FR, CardType.CB_VISA_MASTERCARD); BaseTest._johnsPayInCardWeb = this.Api.PayIns.CreateCardWeb(payIn); } return(BaseTest._johnsPayInCardWeb); }
protected async Task <PayInCardWebDTO> GetJohnsPayInCardWeb() { if (BaseTest._johnsPayInCardWeb == null) { WalletDTO wallet = await this.GetJohnsWallet(); UserNaturalDTO user = await this.GetJohn(); PayInCardWebPostDTO payIn = new PayInCardWebPostDTO(user.Id, new Money { Amount = 1000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, wallet.Id, "https://test.com", CultureCode.FR, CardType.CB_VISA_MASTERCARD); BaseTest._johnsPayInCardWeb = await this.Api.PayIns.CreateCardWeb(payIn); } return(BaseTest._johnsPayInCardWeb); }
public void Test_Idempotency_PayinsCardWebCreate() { string key = DateTime.Now.Ticks.ToString(); WalletDTO wallet = this.GetJohnsWallet(); UserNaturalDTO user = this.GetJohn(); PayInCardWebPostDTO payIn = new PayInCardWebPostDTO(user.Id, new Money { Amount = 1000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, wallet.Id, "https://test.com", CultureCode.FR, CardType.CB_VISA_MASTERCARD); Api.PayIns.CreateCardWeb(key, payIn); var result = Api.Idempotency.Get(key); Assert.IsInstanceOf <PayInCardWebDTO>(result.Resource); }
protected PayInCardWebDTO GetJohnsPayInCardWeb(string walletId) { if (BaseTest._johnsPayInCardWeb == null) { UserNaturalDTO user = this.GetJohn(); PayInCardWebPostDTO payIn = new PayInCardWebPostDTO(user.Id, new Money { Amount = 1000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, walletId, "https://test.com", CultureCode.FR, CardType.CB_VISA_MASTERCARD); //Add TemplateURLOptionsCard for tests payIn.TemplateURLOptionsCard = new TemplateURLOptionsCard { PAYLINEV2 = "https://www.maysite.com/payline_template/" }; BaseTest._johnsPayInCardWeb = this.Api.PayIns.CreateCardWeb(payIn); } return(BaseTest._johnsPayInCardWeb); }
public async Task <PayInCardWebDTO> CreateCardWeb(string idempotencyKey, PayInCardWebPostDTO payIn) { var targetUrl = $"{_baseUrl}/payins/card/web"; return(await CreateEntity <PayInCardWebDTO, PayInCardWebPostDTO>(targetUrl, payIn, idempotencyKey)); }
/// <summary>Creates new payin card web.</summary> /// <param name="idempotencyKey">Idempotency key for this request.</param> /// <param name="payIn">Object instance to be created.</param> /// <returns>Object instance returned from API.</returns> public PayInCardWebDTO CreateCardWeb(String idempotencyKey, PayInCardWebPostDTO payIn) { return(this.CreateObject <PayInCardWebDTO, PayInCardWebPostDTO>(idempotencyKey, MethodKey.PayinsCardWebCreate, payIn)); }
/// <summary>Creates new payin card web.</summary> /// <param name="payIn">Object instance to be created.</param> /// <returns>Object instance returned from API.</returns> public PayInCardWebDTO CreateCardWeb(PayInCardWebPostDTO payIn) { return(CreateCardWeb(null, payIn)); }
/// <summary>Creates new payin card web.</summary> /// <param name="payIn">Object instance to be created.</param> /// <returns>Object instance returned from API.</returns> public async Task <PayInCardWebDTO> CreateCardWeb(PayInCardWebPostDTO payIn) { return(await CreateCardWeb(null, payIn)); }
/// <summary>Creates new payin card web.</summary> /// <param name="payIn">Object instance to be created.</param> /// <returns>Object instance returned from API.</returns> public PayInCardWebDTO CreateCardWeb(PayInCardWebPostDTO payIn) { return(this.CreateObject <PayInCardWebDTO, PayInCardWebPostDTO>(MethodKey.PayinsCardWebCreate, payIn)); }
/// <summary>Creates new payin card web.</summary> /// <param name="idempotencyKey">Idempotency key for this request.</param> /// <param name="payIn">Object instance to be created.</param> /// <returns>Object instance returned from API.</returns> public async Task <PayInCardWebDTO> CreateCardWebAsync(String idempotencyKey, PayInCardWebPostDTO payIn) { return(await this.CreateObjectAsync <PayInCardWebDTO, PayInCardWebPostDTO>(idempotencyKey, MethodKey.PayinsCardWebCreate, payIn)); }