• Articles
  • Api Documentation

    Show / Hide Table of Contents
    • Yort.Humm.InStore
      • CreateKeyRequest
      • CreateKeyResponse
      • HummApiUrlSelector
      • HummClient
      • HummClientConfiguration
      • HummCountry
      • HummEnvironment
      • HummResponseSignatureException
      • HummStatusCodes
      • IHummApiUrlSelector
      • IHummClient
      • InviteRequest
      • InviteResponse
      • PendingAuthorisationEventArgs
      • ProcessAuthorisationRequest
      • ProcessAuthorisationResponse
      • ProcessSalesAdjustmentRequest
      • ProcessSalesAdjustmentResponse
      • ProcessSalesAdjustmentReversalRequest
      • ProcessSalesAdjustmentReversalResponse
      • PurchaseItemsCollection
      • RequestStates
      • SendReceiptRequest
      • SendReceiptResponse
    • Yort.Humm.InStore.Infrastructure
      • Hmac256SignatureGenerator
      • ISignatureGenerator
      • RequestBase
      • ResponseBase
      • SignedRequestWriter

    Class ProcessAuthorisationRequest

    Represents a request to generate a payment plan/contract for the specified amount using the provided pre-approval code generated by a customer's device.

    Inheritance
    Object
    RequestBase
    ProcessAuthorisationRequest
    Inherited Members
    RequestBase.MerchantId
    RequestBase.DeviceId
    RequestBase.PosVersion
    RequestBase.OperatorId
    RequestBase.TrackingData
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Yort.Humm.InStore
    Assembly: Yort.Humm.InStore.dll
    Syntax
    public sealed class ProcessAuthorisationRequest : RequestBase

    Properties

    | Improve this Doc View Source

    AutoHandlePendingResponse

    Gets or sets a value indicating whether the ProcessAuthorisationAsync(ProcessAuthorisationRequest) automatically handles retries pending status responses.

    Declaration
    [JsonIgnore]
    public bool AutoHandlePendingResponse { get; set; }
    Property Value
    Type Description
    Boolean

    True to have the HummClient instance handle pending status responses itself, or false to have the calling code handle them.

    Remarks

    A pending status will only be received if the BuyerConfirms property is true and Humm needs additional time to process the request. In that case, if AutoHandlePendingResponse is true the HummClient instance will raise the PendingAuthorisation event to advise the caller additional time is needed, then wait for the interval specified in the Humm response before retrying the request. This logic will be repeated until Humm returns a final response or an error occurs.

    If AutoHandlePendingResponse is false and a pending status response is received, it is up to the calling user code to take the appropriate actions.

    | Improve this Doc View Source

    BuyerConfirms

    Gets or sets a value indicating whether or not the 'big things' flow is supported.

    Declaration
    [JsonProperty("buyer_confirms")]
    public bool BuyerConfirms { get; set; }
    Property Value
    Type Description
    Boolean

    True to indicate the calling system supports and wants to enable the 'big things' flow for this transaction.

    Remarks

    The 'big things' flow occurs when making purchases over a certain dollar limit, determined by Humm, which may require additional credit checks, confirmaton by the customer and so on. In this case the calling system must be prepared to handle pending responses appropriately and potentially wait longer to receive an outcome. The default value is false to indicate this is not supported, set to true to indicate it is.

    | Improve this Doc View Source

    ClientTransactionReference

    Required. Gets or sets the unique client transaction reference.

    Declaration
    [JsonProperty("x_pos_transaction_ref")]
    public string ClientTransactionReference { get; set; }
    Property Value
    Type Description
    String

    The unique client transaction reference.

    Remarks

    This value should be unique and re-used on repeat calls for the same payment (in case of network/timeout errors etc) to ensure idempotency (and avoid duplicate procesing).

    If the value used here a temporary value not associated with the invoice/receipt/transaction document generated by the POS, a subsequent SendReceiptRequest can be made to update the created payment plan/contract with the final POS transaction reference.

    If the BuyerConfirms property is true then a 'big things' flow may occur which could take extra processing time. In this case one or more responses with a status of Pending may be received and require the request to be resent at a specified interval. The application code can choose to handle this itself, or set the AutoHandlePendingResponse property to true. In that case the library will automatically take care of handling the pending response, waiting the specified interval, an retrying the request until a final status is arrived at. The PendingAuthorisation can be used in this flow for logging and updating the POS UI to keep the operator informed of progress. The event is not used if AutoHandlePendingResponse is false (or a pending status response is not received).

    Maximum length of 64 characters.

    | Improve this Doc View Source

    FinanceAmount

    Required. Gets or sets the dollvar value the customer wants to pay via Humm.

    Declaration
    [JsonProperty("x_finance_amount")]
    public decimal FinanceAmount { get; set; }
    Property Value
    Type Description
    Decimal

    The finance amount as a dollar value in decimal format.

    Remarks

    Although the Humm API requires this value to be sent as a number of cents, this library uses a dollar value and will perform the conversion to cents for you. For example, to send $119.50 set this value to 119.5.

    | Improve this Doc View Source

    PreapprovalCode

    Required. Gets or sets the preapproval code generated by the customer's device. Normally scanned as a barcode, or entered via keyboard if neccesary.

    Declaration
    [JsonProperty("x_pre_approval_code")]
    public string PreapprovalCode { get; set; }
    Property Value
    Type Description
    String

    A string containing the preapproval code.

    Remarks

    Expected length is between 6 and 10 digits, but this is not validated as per the Humm documentation, in order to allow for future changes.

    | Improve this Doc View Source

    PurchaseAmount

    Required. Gets or sets the total purchase amount (including any value paid via Humm).

    Declaration
    [JsonProperty("x_purchase_amount")]
    public decimal PurchaseAmount { get; set; }
    Property Value
    Type Description
    Decimal

    The full purchase amount.

    Remarks

    Although the Humm API requires this value to be sent as a number of cents, this library uses a dollar value and will perform the conversion to cents for you. For example, to send $500 set this value to 500.

    | Improve this Doc View Source

    PurchaseItems

    Optional (may be null). Gets or sets details about what was purchased.

    Declaration
    [JsonProperty("purchase_items")]
    public PurchaseItemsCollection PurchaseItems { get; set; }
    Property Value
    Type Description
    PurchaseItemsCollection

    The purchase items.

    Remarks

    This detail may appear on both the seller and customer's portal when looking at the transaction, providing greater detail about the purchase in that context.

    See Also
    PurchaseItemsCollection

    Methods

    | Improve this Doc View Source

    Validate()

    Validates this request.

    Declaration
    public override void Validate()
    Overrides
    RequestBase.Validate()
    Remarks

    Ensures that ClientTransactionReference and PreapprovalCode are not null, empty string or only whitespace. Also ensure no property is larger than it's maximum allowed length (see individual property notes for details). Also ensures all base properties are valid, see Validate().

    Does not validate the pre-approval code length or finance amounts, as rules for these are likely to vary over time. It is better to let the API respond with an error result than pre-validate these values.

    See Also

    RequestBase
    ProcessSalesAdjustmentResponse
    ProcessAuthorisationAsync(ProcessAuthorisationRequest)
    • Improve this Doc
    • View Source
    Back to top Copyright (c) 2020 Troy Willmot