📅  最后修改于: 2023-12-03 15:33:28.262000             🧑  作者: Mango
The Swiss QR-bill is a new payment slip format that was introduced in Switzerland in 2019 to simplify and streamline the payment process. It combines the information necessary for payment and the recipient's account information in one QR code. This makes it easier for customers to make payments, and for businesses to receive payments.
To create Swiss QR-bills for your business, or to integrate Swiss QR-bill creation into your software, you can use the PHP Create Swiss QR-Bill API. This API allows you to generate Swiss QR-bills that comply with the latest Swiss standards.
To use the PHP Create Swiss QR-Bill API, you will need the following:
To install the PHP Create Swiss QR-Bill API, you can use Composer. Simply run the following command in your command line interface:
composer require kingflamez/swiss-qr-bill
To use the PHP Create Swiss QR-Bill API, you can follow these steps:
use SwissQrBill\Payment\Payment;
$bill = new Payment('Customer Name', 'CH4431999123000889012');
$bill->setAmount(100.00);
$bill->setCurrency('USD');
$bill->setReference('123456789012345678901234567');
$bill->setAdditionalInformation('Monthly Subscription');
$bill->setCreditor(
'Business Name',
'CH4431999123000889012',
'Address',
'City',
'CH',
'John Doe'
);
$bill->setDebtor(
'Customer Name',
'Address',
'City',
'CH'
);
// Output as raw image data
$imageData = $bill->getQrCodeImage();
// Output as SVG string
$svgString = $bill->getQrCodeSvg();
The PHP Create Swiss QR-Bill API makes it easy to generate Swiss QR-bills for your business or software. By following the steps above, you can create QR-bills that comply with the latest Swiss standards.