peiTeX / qrbill

LaTeX package to create qrbills based on the Swiss standard
13 stars 3 forks source link

working example? #5

Closed scfrank-pri closed 3 years ago

scfrank-pri commented 3 years ago

Thanks for providing this package. I tested it with real Swiss bank data and the UBS Mobile Banking App, which can scan QR code. But I always get the error message: "Der QR Code konnte nicht gelesen werden". I understand that that, e.g., TWINT requires additions to the QR code that are probably not integrated. But I thought it should work with a normal Swiss QR code scanner. Could you tell how your test worked, or what are the requirements on the user side? Thanks.

TeXhackse commented 3 years ago

Hi, as mentioned in #3 there has been an error in the old Version of qrbill standard. So readers did only accept the version code 0200 instead of the 0210. This could be adjusted via config we decided to not implement this error.

I just checked, because there was a new version of the qrbill standard announced, and I just readlized that it seems to be updated. I did not yet have time to have a look at the changes but will try to find time for this soon. Maybe this issue also arising due to the changes in the standard.

TeXhackse commented 3 years ago

Seems like theey finally change that so it's now conform to the standard to use 0200. I will change the default setting to version 2.2 and provide an update.

Until this is done you can create a config for 2.2 swiss-0220.qrbill-cfg.tex containing the code below and using the option qrscheme=swiss-0220 on the qrbill package. This should solve the issue.

\qrbillsetup{
        creditorprefix =CR-,
        debtorprefix =UD-,
}

\SetQrScheme{
  QRType,
  Version,
  CodingType,
  Account,
  CR-AddressType,
  CR-Name,
  CR-Address1,
  CR-Address2,
  CR-PostalCode,
  CR-City,
  CR-Country,
  UCR-AddressType,
  UCR-Name,
  UCR-Address1,
  UCR-Address2,
  UCR-ZIP,
  UCR-City,
  UCR-Country,
  Amount,
  Currency,
  UD-AddressType,
  UD-Name,
  UD-Address1,
  UD-Address2,
  UD-PostalCode,
  UD-City,
  UD-Country,
  ReferenceType,
  Reference,
  Message,
  Trailer,
  BillingInfo,
  AV1-Parameters,
  AV2-Parameters
}

\SetBillingInfoScheme{
  prefix=//S1,
  10=invoicenum,
  11=invoicedate,
  20=customerref,
  30=vat,
  31=vatdate,
  32=vatdetails,
  33=importvat,
  40=conditions
}

\SetupQrBill{
        QRType=SPC,
        Version=0200,%this is the only change between version 2.1 and 2.2.
        CodingType=1,
        Trailer=EPD,
        Currency=CHF,
        ReferenceType=NON,
}
\endinput
scfrank-pri commented 3 years ago

Great. I will test this ASAP. In the meantime, I installed another app from ZKB and this one could read the QR code and process everything as expected :-). So, UBS is either ahead or behind ...

scfrank-pri commented 3 years ago

I can confirm that with the new config file swiss-0220.qrbill-cfg.tex the QR code recognition works for both apps from UBS and from ZKB. So, the problem is solved. Thanks a lot!

TeXhackse commented 3 years ago

@scfrank-pri you are welcome, Please pay attention, that the version code 0200 is now required for all 2.x versions.

This should now be accepted by all banking apps, now that this change is also documented (unlike the status of last year).