Foreword
How long I live next to the world of technology, I always thought that there is an IT elite - people who write code with their eyes closed can easily generate md5 in their minds and rewrite unix cores. And to tell you the truth, I thought it was these guys who worked for Yandex. We were very surprised that their brainchild, called Yandex.Kassa, is in the deepest alpha testing. On some of the problems that we have encountered and the ways to solve them in this article.
Yandex.NotBetaDegree
After successful registration in the system, you will be asked to choose the integration path: for real Geeks - http, or less complicated email. We have a self-written CMS, so choosing a ready-made integration template was not possible.
We were successfully provided with documentation, demo access, and with the established deadline, our work was boiling.
About personal accountThe personal account does not work at all, more precisely - it works once, so all information needs to be transferred / changed / received only from your personal manager. Be careful.
After much suffering, we still faced the task of making a test payment. But, as happens in life - the first pancake is always lumpy. We immediately received a technical error message. Turning to technical support, they realized that they were to blame for the carelessness of reading the documentation and soon, when they were fully prepared, they started the second test payment. Already on the 20th test payment, it became clear that the tool was still quite raw and not ready for everyday work.
Our mistakes, and their solutions
#one
In my opinion, the stupidest mistake was a typo in the checkurldemo address.
We accidentally, can not even imagine how, wrote the fourth Russian letter "s", and, in my opinion, the worst thing that we learned about it after 3 days. Yandex does not take into account the fact of a typo and tech support does not hesitate to return us a log with a question mark in the url.
')
Sample tech support answer # 1Here is the answer our server receives, check the availability of the server:
<html> <head> <title>che?kurldemo</title> <META name="keywords" content="?????? ???????,, che?kurldemo" /> <META name="description" content="?????? ??????? che?kurldemo" /> <script src="/project/js/jquer
Be careful, even though it is a stupid mistake, but it has a place to be, and you, unfortunately, will be left alone with this problem.
# 2
Misfortune never comes alone. The documentation did not notice that Yandex.Kassa uses ISO8601 format time stamps in its XML serialization. It took us another day to figure this out. Be careful.
ISO8601: 2004The format is defined as:
YYYY-MM-DDThh: mm: ss.fZZZZZ
Format decoding
Yyyy
year, exactly 4 digits
MM
month, exactly 2 digits (01 = January, etc.)
DD
day of the month, exactly 2 digits (from 01 to 31)
T
Latin character "T", must be in upper case
hh
hours, exactly 2 digits (24-hour format, from 00 to 23)
mm
minutes, exactly 2 digits (from 00 to 59)
ss
seconds, exactly 2 digits (from 00 to 59)
f
fractional second (from 1 to 6 digits),
may be absent, in this case the separator “.” should be omitted
Zzzzz
Time zone descriptor, can be:
Z - UTC, the symbol "Z" must be in upper case.
+ hh: mm or -hh: mm - offset relative to UTC (GMT) (indicates that the local time is indicated, which is a given number of hours and minutes ahead of or behind UTC).
All the indicated elements must be present, it is permissible to omit only the fractional part of seconds (in this case the “.” Separator should also be omitted). If you need to set only the date, then the time should still be specified as 00:00:00.
Examples:
2011-07-24T19: 00: 00 + 04: 00 - 19 hours 00 minutes July 24, 2011, the time zone is UTC + 4 hours.
2004-07-24T15: 00: 00Z - the same point in time in the canonical representation.
2004-07-24T15: 00: 00.666Z is the same instant of time plus 666 milliseconds.
Note the example of the wrong function:
<?php echo date(DATE_ISO8601); ?>
Displays the wrong format, because the time zone must be separated by ":".
# 3
We had a deadline, we had a client. The third mistake is so bricked up in the mind of Yandex that it was recognized only after 3 days of our torment. Neither the personal account, nor your manager, nor a technical support specialist will tell you what I will say.
Secret from YandexThe shopPassword parameter has a length limit of 20 characters.
The client insisted on the complexity of all passwords and we, as exemplary performers, fulfilled all the instructions, filling in the shopPassword field with 28 UFO letters. But after seven laps in the hell of debugging the “Invalid md5” error, it turned out that it had a limit of 20 characters. Yandex by default cuts the password to this length.
Support service quotes:
" ... nothing terrible happened ... "
Nowhere and nothing is written about it, so be careful.
In custody
The post does not pretend to high karma, and even more so for the article of the month, it is intended to help colleagues in the difficult work of integration.