Receipt Bundle
This bundle creates printable form of pay receipt PD-14 usualy used in banks of Russia.
composer require sergeym/pay-receipt-bundle:dev-master
or add to your composer json
{
"require": {
"sergeym/pay-receipt-bundle": "dev-master"
}
}
Enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Sergeym\ReceiptBundle\SergeymReceiptBundle()
);
}
sergeym_receipt:
template:
pd4: SergeymReceiptBundle:Default:pd4.html.twig # ../recipe/pd4 or just ../recipe because it default value
# add more pay receipt form templates here
merchant:
1: # merchant_id
extra:
payee: ~
okato: ~
inn: ~
kpp: ~
account: ~
bank: ~
correspondent_account: ~
bik: ~
#add more extra field for template injection using {{ receipt.extra('extra-name') }}
# you can add more merchants
# app/config/routing.yml
sergeym_receipt:
resource: "@SergeymReceiptBundle/Resources/config/routing.yml"
prefix: /
Post request to /receipt or /receipt/{receipt_form_name}, where {receipt_form_name} is template name in sergeym_receipt.template section in config.yml
POST data:
post_code
post_address
payer_name
name
merchant_id
currency_code
currency_digits_after_decimal_point
total_amount
return_url