Retrieve QR Code of Sent Invoice by calling the
qrCode
method
on the Invoice class by passing a valid
notification object
(See bootstrap.php for more on ApiContext
)
This is not a required step. However, if you want to store this image as a file, you can use 'saveToFile' method with proper file name. This will save the image as /samples/invoice/images/sample.png
NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
In PHP, there are many ways to present an images. One of the ways, you could directly inject the base64-encoded string with proper image information in front of it.
Retrieve QR Code for Invoice Sample
Specify an invoice ID to get a QR code (image) that corresponds to the invoice ID. A QR code for an invoice can be added to a paper or PDF invoice. When a customer uses their mobile device to scan the QR code, the customer is redirected to the PayPal mobile payment flow, where they can pay online with PayPal or a credit card.