本文整理汇总了C#中IInvoice.Currency方法的典型用法代码示例。如果您正苦于以下问题:C# IInvoice.Currency方法的具体用法?C# IInvoice.Currency怎么用?C# IInvoice.Currency使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IInvoice
的用法示例。
在下文中一共展示了IInvoice.Currency方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetMessage
private MessageObject GetMessage(IInvoice invoice, IPayment payment)
{
if (invoice == null || payment == null)
return null;
MessageObject pay = _messageFactory.CreatePayInit();
pay.SetAttribute(SaferPayConstants.MessageAttributes.AccountId, _settings.AccountId);
pay.SetAttribute(SaferPayConstants.MessageAttributes.Amount, (invoice.Total * 100).ToString("##"));
pay.SetAttribute(SaferPayConstants.MessageAttributes.Currency, invoice.Currency().CurrencyCode);
pay.SetAttribute(SaferPayConstants.MessageAttributes.Description, _settings.Desciption);
pay.SetAttribute(SaferPayConstants.MessageAttributes.OrderId, invoice.Key.ToString());
// return urls
pay.SetAttribute(SaferPayConstants.MessageAttributes.FailLink, GetWebsiteUrl(SaferPayConstants.Api.FailMethodName, invoice.Key, payment.Key));
pay.SetAttribute(SaferPayConstants.MessageAttributes.BackLink, GetWebsiteUrl(SaferPayConstants.Api.BackMethodName, invoice.Key, payment.Key));
pay.SetAttribute(SaferPayConstants.MessageAttributes.SuccessLink, GetWebsiteUrl(SaferPayConstants.Api.SuccessMethodName, invoice.Key, payment.Key));
// todo: get them settings
pay.SetAttribute(SaferPayConstants.MessageAttributes.NotifyAddress, _settings.NotifyAddress);
pay.SetAttribute(SaferPayConstants.MessageAttributes.LangId, System.Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName);
pay.SetAttribute(SaferPayConstants.MessageAttributes.ShowLanguages, "yes");
if (invoice != null)
{
IAddress address = invoice.GetBillingAddress();
pay.SetAttribute(SaferPayConstants.MessageAttributes.Delivery, "no");
pay.SetAttribute(SaferPayConstants.MessageAttributes.UserNotify, invoice.BillToEmail);
pay.SetAttribute(SaferPayConstants.MessageAttributes.Company, invoice.BillToCompany);
pay.SetAttribute(SaferPayConstants.MessageAttributes.Firstname, invoice.GetBillingAddress().TrySplitFirstName());
pay.SetAttribute(SaferPayConstants.MessageAttributes.Lastname, invoice.GetBillingAddress().TrySplitLastName());
pay.SetAttribute(SaferPayConstants.MessageAttributes.Street, invoice.BillToAddress1);
pay.SetAttribute(SaferPayConstants.MessageAttributes.Zip, invoice.BillToPostalCode);
pay.SetAttribute(SaferPayConstants.MessageAttributes.City, invoice.BillToLocality);
pay.SetAttribute(SaferPayConstants.MessageAttributes.Country, invoice.BillToCountryCode);
pay.SetAttribute(SaferPayConstants.MessageAttributes.EMail, invoice.BillToEmail);
pay.SetAttribute(SaferPayConstants.MessageAttributes.Phone, invoice.BillToPhone);
}
return pay;
}
开发者ID:ninjaonsafari,项目名称:Opten.Umbraco.Merchello.Plugins.Payment.SaferPay,代码行数:40,代码来源:SaferPayPaymentProcessor.cs