Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate BKP/PKP? #40

Open
skorunka opened this issue Mar 5, 2017 · 4 comments
Open

How to generate BKP/PKP? #40

skorunka opened this issue Mar 5, 2017 · 4 comments

Comments

@skorunka
Copy link

skorunka commented Mar 5, 2017

Hi, could you please provide a PHP code to generate BKP/PKP?

@daddyy
Copy link

daddyy commented Mar 6, 2017

Hi when you set a receipt to dispatcher you can call getters under the dispatcher for bkp and pkp.

@khoralek
Copy link

khoralek commented Mar 8, 2017

Hello,
i used
$res=$dispatcher->getCheckCodes($r);
$bkp=$res['bkp'][''];
$pkp=$res['pkp']['
'];
$bkp seems OK, but $pkp is something unreadable. See var_dump lower. What's wrong ?

["pkp"]=>
array(4) {
["_"]=>
string(256) "f���dM}��3����.��Z��7���I.�*���nj������dX_��_ʭd W&x�����3+�W��� �W�ˋM4�b�O|�3�g�W�4UHJ�h)Q(x
�?-��`�HSi"D���-���������{��0�$V�
��s��qw��xW(��9_�O����E���k���E�WS�s�J2 ���� ��7NĊ�f>�j�8���e�=�
�^���A��4O�s*΃�N����DQ���7���8 *��m�"�\le1���2��Uٸ3�"
["digest"]=>
string(6) "SHA256"
["cipher"]=>
string(7) "RSA2048"
["encoding"]=>
string(6) "base64"
}

@Pomezny
Copy link

Pomezny commented Mar 8, 2017

@khoralek You need to base64_encode() the pkp. As I mentioned in #22
@skorunka Can you close the issue? This is not issue with the code.

@daddyy
Copy link

daddyy commented Mar 8, 2017

Why are ou using function getCheckCodes?
Why are you not using get for Bkp and PKP?
https://github.com/ondrejnov/eet/blob/master/src/Dispatcher.php#L386
https://github.com/ondrejnov/eet/blob/master/src/Dispatcher.php#L394

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants