public static Payment Create(String payerPartyReference, String receiverPartyReference, String currency, Decimal paymentAmount) { var payment = new Payment { payerPartyReference = PartyReferenceFactory.Create(payerPartyReference), paymentAmount = new NonNegativeMoney { amount = paymentAmount, currency = new Currency { Value = currency }, amountSpecified = true }, receiverPartyReference = PartyReferenceFactory.Create(receiverPartyReference) }; return(payment); }
public static Payment Create(string identifier, bool pay, NonNegativeMoney paymentAmount, DateTime adjustedPaymentDate, PaymentType paymentType, decimal discountFactor, Money presentValueAmount) { var payment = new Payment(); var result = AdjustableOrAdjustedDateHelper.CreateAdjustedDate(adjustedPaymentDate); payment.paymentDate = result; payment.discountFactor = discountFactor; payment.discountFactorSpecified = true; payment.href = identifier; payment.payerPartyReference = (pay) ? PartyReferenceFactory.Create("CBA") : PartyReferenceFactory.Create(""); payment.paymentAmount = paymentAmount; payment.paymentType = paymentType; payment.presentValueAmount = presentValueAmount; payment.receiverPartyReference = (pay) ? PartyReferenceFactory.Create("") : PartyReferenceFactory.Create("CBA"); return(payment); }