| @@ -120,17 +120,17 @@ class DataConverter | |||||
| { | { | ||||
| $ret = new static(); | $ret = new static(); | ||||
| $dec = QRCryptoLogic::decrypt($data); | |||||
| if (strlen($dec) !== 30) { | |||||
| throw new GeneralErrorMessageException("文字数不正"); | |||||
| } | |||||
| $data = substr($dec, 5); | |||||
| $target = substr($data, 5); | |||||
| $ret->発行端末 = substr($data, 0, 2); | |||||
| $ret->発行日 = Carbon::createFromFormat("Ymd", substr($data, 2, 8)); | |||||
| $ret->発行連番 = intval(substr($data, 10, 6)); | |||||
| $ret->顧客コード = substr($data, 16, 4); | |||||
| $ret->駐車場管理コード = substr($data, 20, 5); | |||||
| $dec = QRCryptoLogic::decrypt($target); | |||||
| if (strlen($dec) !== 15) { | |||||
| throw new GeneralErrorMessageException("URL不正"); | |||||
| } | |||||
| $ret->発行端末 = substr($dec, 0, 2); | |||||
| $ret->発行日 = Carbon::createFromFormat("Ymd", substr($dec, 2, 8)); | |||||
| $ret->発行連番 = intval(substr($dec, 10, 6)); | |||||
| $ret->顧客コード = substr($dec, 16, 4); | |||||
| $ret->駐車場管理コード = substr($dec, 20, 5); | |||||
| return $ret; | return $ret; | ||||