Table of Contents

Interface IOrderPaymentService

Namespace
GastroSky.Services.OrderPaymentService
Assembly
GastroSky.dll

Service for checking if an Order has been paid in full or not.

public interface IOrderPaymentService

Methods

CheckOrderPaymentStatus(Order)

Returns true if the specified order has been paid in full. This contacts the payment service provider's web API and queries the paid amount for a given reference ID there, so use sparingly! We don't wanna test exactly HOW many requests we can send out there before being rate-limited :')

Task<bool> CheckOrderPaymentStatus(Order order)

Parameters

order Order

The Order to check.

Returns

Task<bool>

Returns true if the specified order has been paid in full. If it returns true, the db context must be saved!

Remarks

This method sets the passed order's fields "RawPaymentData" and "RawPaymentData" to their new, updated values if the payment has meanwhile been executed in full. Remember to save those changes to DB afterwards: this method does NOT call SaveChangesAsync()