Skip to main content

Sending a Receipt


The complete example for sending a receipt notification is illustrated in the following file: ./examples/document/receipt/send_receipt.php

To send a receipt notification, the following steps are necessary:

// 1. Create a receipt (setting the receipt number)
$receipt = new Receipt('NYGTA-2021-001');

// 2. Initialize the buyer
$buyer = new Buyer();

// 3. Set the buyer's email address (where the notification will be sent)

// 4. Add buyer data to the receipt

// 5. Create the seller
$seller = new Seller();

// 6. Set the seller's email notification details
$seller->setEmailSubject('Email tárgya');
$seller->setEmailContent('Ez az email szövege...');

// 7. Add seller data to the receipt

// 8. Send the receipt
$result = $agent->sendReceipt($receipt);

Expected and Optional Inputs

Receipt Header Data

receipt numberreceiptNumberstringyes

Email Sending Data

email reply-toemailReplyTostring
email subjectemailSubjectstring
email contentemailContentstring