Table of Contents

Class PaymentCardService

Namespace
Dynamicweb.Ecommerce.Cart
Assembly
Dynamicweb.Ecommerce.dll
public class PaymentCardService
Inheritance
PaymentCardService
Inherited Members

Methods

CreatePaymentCard(int, string, string, string, string, string)

Save card token for specified user.
public PaymentCardToken CreatePaymentCard(int userId, string paymentId, string cardName, string cardType, string cardIdentifier, string cardToken)

Parameters

userId int
The id of user
paymentId string
The id of payment gateway
cardName string
cardType string
cardIdentifier string
cardToken string

Returns

PaymentCardToken

CreatePaymentCard(int, string, string, string, string, string, string)

Save card token for specified user.
[Obsolete("Use the overload without languageId.")]
public PaymentCardToken CreatePaymentCard(int userId, string paymentId, string languageId, string cardName, string cardType, string cardIdentifier, string cardToken)

Parameters

userId int
The id of user
paymentId string
The id of payment gateway
languageId string
The language id
cardName string
cardType string
cardIdentifier string
cardToken string

Returns

PaymentCardToken

Delete(PaymentCardToken)

Deletes the paymentCard.
public void Delete(PaymentCardToken paymentCard)

Parameters

paymentCard PaymentCardToken

GetByCustomerNumber(string)

Retrieve cards by user customer number
public IEnumerable<PaymentCardToken> GetByCustomerNumber(string customerNumber)

Parameters

customerNumber string
The user customer number

Returns

IEnumerable<PaymentCardToken>

GetById(int)

Retrieve payment card by id.
public PaymentCardToken GetById(int paymentCardId)

Parameters

paymentCardId int
The id of payment card.

Returns

PaymentCardToken

GetByUserId(int)

Retrieve cards for an user.
public IEnumerable<PaymentCardToken> GetByUserId(int userId)

Parameters

userId int
The id of user.

Returns

IEnumerable<PaymentCardToken>

GetByUserId(int, string)

Retrieve payment cards for an user for specified payment id.
public IEnumerable<PaymentCardToken> GetByUserId(int userId, string paymentId)

Parameters

userId int
The id of the user.
paymentId string
The id of the payment.

Returns

IEnumerable<PaymentCardToken>

GetByUserId(int, string, string)

Retrieve payment cards for an user for specified payment id and language id.
[Obsolete("Use the overload without languageId.")]
public IEnumerable<PaymentCardToken> GetByUserId(int userId, string paymentId, string languageId)

Parameters

userId int
The id of the user.
paymentId string
The id of the payment.
languageId string
The language id.

Returns

IEnumerable<PaymentCardToken>

Save(PaymentCardToken)

Saves current data to the database.
public void Save(PaymentCardToken paymentCard)

Parameters

paymentCard PaymentCardToken

SetDefaultPaymentCard(int, int, bool)

mark\unmark payment card as default for the user.
public void SetDefaultPaymentCard(int userId, int paymentCardId, bool isDefault)

Parameters

userId int
The id of user
paymentCardId int
The id of payment card PaymentCardToken
isDefault bool
true if the token should be default; false otherwise.
To top