Class SavedPaymentMoneyInMerchant
This is one of the templates available for creating a custom money in merchant. Most of the time this merchant type is processing credit card payments.
Inherited Members
Namespace: DirectScale.Disco.Extension
Assembly: DirectScale.Disco.Extension.Abstractions.dll
Syntax
public abstract class SavedPaymentMoneyInMerchant : MoneyInMerchant
Remarks
This is normally for with merchants that can capture, store, and charge a credit card without DirectScale ever being in contact with the sentitive details. The card is usually entered into a secure form hosted by the merchant. A token that can be used to reference that card is returned to DirectScale and saved. Then, the order can be completed and the credit card charged using that token.
This is the most common merchant integration and is recommended if the merchant has a hosted form like discribed and can fit into this process flow.
Constructors
SavedPaymentMoneyInMerchant()
Declaration
protected SavedPaymentMoneyInMerchant()
Methods
ChargePayment(String, Payment, Double, String, Int32)
Override this method to send a payment for processing to a custom integrated merchant.
Declaration
public abstract Task<ExtendedPaymentResult> ChargePayment(string payerId, Payment payment, double amount, string currencyCode, int orderNumber)
Parameters
Type | Name | Description |
---|---|---|
System.String | payerId | The payer (or associate) placing the order. See GetNewPayerId(Int32) for details. |
Payment | payment | The payment method to be used. |
System.Double | amount | The amount of the payment being placed. |
System.String | currencyCode | The currency code for |
System.Int32 | orderNumber | The order number being placed. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ExtendedPaymentResult> | The result of the payment. |
Remarks
A customer with a saved payment is trying to place an order. payerId
is the customer's id with the merchant. If additional information is needed for processing, it can likely be found by calling GetOrderByOrderNumber(Int32).
DeletePayment(String, String)
Override this method to property delete a saved payment with an external merchant. The payment will be removed from Directscale databases before this call, but often the merchant also has this paymentMethodId
saved as well.
Declaration
public virtual Task DeletePayment(string payerId, string paymentMethodId)
Parameters
Type | Name | Description |
---|---|---|
System.String | payerId | They paye (or associate) deleting a payment method. See GetNewPayerId(Int32) for details. |
System.String | paymentMethodId | The payment method being deleted. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
GetExternalPayments(String)
Used to retrieve saved payment methods for payerId
that are not saved in disco.
Declaration
public virtual Task<Payment[]> GetExternalPayments(string payerId)
Parameters
Type | Name | Description |
---|---|---|
System.String | payerId | The payer (or associate) placing the order. See GetNewPayerId(Int32) for details. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Payment[]> |
Remarks
This is not very commonly used. If a customer has a merchant account, and has access to add saved payments without using DirectScale, this method can be used to get all of the
GetSavePaymentFrame(String, Nullable<Int32>, String, String, Region)
Gets the Iframe to be displayed when the customer selects to add a new payment for this merchant.
Declaration
public abstract Task<AddPaymentFrameData> GetSavePaymentFrame(string payorId, Nullable<int> associateId, string languageCode, string countryCode, Region region)
Parameters
Type | Name | Description |
---|---|---|
System.String | payorId | |
System.Nullable<System.Int32> | associateId | |
System.String | languageCode | |
System.String | countryCode | |
Region | region |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<AddPaymentFrameData> |
Remarks
The way this normally works, is that the merchant being integrated with will have a hosted payment form that can be used to save a payment method that can be used later to pay for orders. Note: The merchant hosted forms that are Iframed in are the best way. It offloads the security and compliance risk to the merchant. If you create a form that allows you access to the full credit card or account number, you must obtain rigorous and expensive PCI compliance certification!