コード例 #1
0
        public TrustlyPrefillInfoDto(TrustlyPrefillInfo prefillInfo)
        {
            if (prefillInfo == null)
            {
                return;
            }

            FirstName = prefillInfo.FirstName;
            LastName  = prefillInfo.LastName;
        }
コード例 #2
0
 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);
 }