M132 Betalingscorrectie

M132 Betalingscorrectie

De betaling van Ticket N14/50 voor 52 Eur werd gedaan door middel van een krediet kaart. (Mastercard via EFT) en niet cash zoals oorspronkelijk werd ingegeven.

C#
        
//Create the correct action according to the example
var newPaymentCorrectionAction = new PosPaymentCorrectionAction(
    FpsFinancesModels.Company,
    _myFpsPos,
    FpsFinancesModels.TerminalTer1Bar,
    FpsFinancesModels.EmployeeJohn)
{
    SalesActionNumber = 1008,
    BookingDate = DateTime.Now,
    BookingPeriodId = Guid.Parse("dffcd829-a0e5-41ca-a0ae-9eb887f95637"),
    CheckboxReference = new CheckboxSignReference
    {
        Checkbox = FpsFinancesModels.Checkbox01,
        DateTime = new DateTime(2024, 7, 29, 11, 35, 09),
        Eventlabel = EventLabel.N,
        EventCounter = 14,
        TotalCounter = 50
    },
    Payments =
    [
        new Payment
        {
            Id = "1",
            Name = "CONTANT",
            Type = PaymentType.CASH,
            InputMethod = InputMethod.MANUAL,
            Amount = -52,
            AmountType = PaymentLineType.PAYMENT,
            CashDrawer = FpsFinancesModels.CashDrawer1
        },
        new Payment()
        {
            Id = "2",
            Name = "MASTERCARD",
            Type = PaymentType.CARD_CREDIT,
            InputMethod = InputMethod.AUTOMATIC,
            Amount = 52,
            AmountType = PaymentLineType.PAYMENT
        }
    ]
};

//Sign the action
var result = await checkboxService.SignPosAction(newPaymentCorrectionAction, false, null, cancellationToken);

//Handle the result accordingly
Console.WriteLine($"Result with Signature {result.SignResult?.DigitalSignature}");