public TrustlyPrefillInfoDto(TrustlyPrefillInfo prefillInfo) { if (prefillInfo == null) { return; } FirstName = prefillInfo.FirstName; LastName = prefillInfo.LastName; }
public PaymentRequestBuilder WithTruslyTestValues(string payeeId, Operation testOperation) { this.operation = testOperation ?? Operation.Purchase; this.intent = PaymentIntent.Sale; this.currency = new Currency("SEK"); this.description = "Test Purchase"; this.payerReference = "SomeReference"; this.userAgent = "Mozilla/5.0..."; this.language = new Language("sv-SE"); SetUrls(); this.payeeInfo = new PayeeInfo(payeeId, DateTime.Now.Ticks.ToString()); this.amount = new Amount(1600); this.vatAmount = new Amount(0); this.metadata = new Metadata { { "key1", "value1" }, { "key2", 2 }, { "key3", 3.1 }, { "key4", false } }; this.prices = new List <IPrice> { new Price(this.amount, PriceType.Trustly, this.vatAmount) }; this.trustlyPrefillInfo = new TrustlyPrefillInfo("Ola", "Nordmann"); return(this); }