Class PaymentService
- Namespace
- Dynamicweb.Ecommerce.Orders
- Assembly
- Dynamicweb.Ecommerce.dll
- Inheritance
-
Payment
Service
- Implements
- Inherited Members
Methods
ClearCache()
Clears cached payments.
ClearCache(IEnumerable<string>)
Resets the specified keys to the default value for objects stored in the object cache
Parameters
keys
IEnumerable<string>Keys to reset
ClearCache(string)
Resets the specified key to the default value for objects stored in the object cache
Parameters
key
stringKey to reset
Clone(Payment)
Clones this instance.
Parameters
payment
Payment
Returns
CopyPayment(string)
Copies the payment, fees and country relations based on the paymentId, appending "(Copy)" to the name.
Parameters
paymentId
stringThe id of the payment to copy.
Delete(string)
Deletes the payment with specified ID.
Parameters
paymentId
stringThe payment ID.
DeleteByLanguage(string)
Deletes translations by language.
Parameters
languageId
stringThe language ID.
GetDefaultPaymentMethod(string, bool)
Gets the default payment method.
Parameters
countryCode
stringThe country code.
onlyActive
boolIf set to
true
, only active payment methods will be included to the result, otherwise inactive will be also included.
Returns
GetPayment(string)
Gets the payment methods that has relation to any country.
Parameters
paymentId
string
Returns
GetPayment(string, string, string)
Gets the payment methods that has relation to specified country.
Parameters
Returns
GetPaymentMethodsForUser(User, IEnumerable<Payment>)
Gets the active payment methods the user has access to in the list of payments provided.
Parameters
user
UserThe User. Use null for anonymous user.
payments
IEnumerable<Payment>The payments to check if the user has access against.
Returns
- IEnumerable<Payment>
A collection of payment methods.
GetPaymentMethodsForUser(User, string, string)
Gets the active payment methods with the suitable country code and region code for the user.
public IEnumerable<Payment> GetPaymentMethodsForUser(User user, string countryCode, string regionCode)
Parameters
user
UserThe User. Use null for anonymous user.
countryCode
stringThe country code.
regionCode
stringThe region/state code.
Returns
- IEnumerable<Payment>
A collection of payment methods.
GetPayments()
Gets the payment methods with country relations.
Returns
GetPayments(string, string, bool)
Gets the payment methods with the suitable country code AND region code.
Parameters
countryCode
stringThe country code.
regionCode
stringThe region/state code.
onlyActive
boolIf set to
true
, only active payment methods will be included to the result, otherwise inactive will be also included.
Returns
GetPaymentsWithoutRegions(bool)
Gets all payment methods
Parameters
onlyActive
boolIf set to
true
, only active payment methods will be included to the result, otherwise inactive will be also included.
Returns
Save(Payment)
Saves payment.
Parameters
payment
PaymentThe payment.