paycore / xpayua
Simplify work with xpayua api
Installs: 19 317
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 7
Forks: 1
Open Issues: 0
Requires
- ext-openssl: *
- phpseclib/phpseclib: ^2.0
This package is auto-updated.
Last update: 2024-11-09 14:45:22 UTC
README
This library aims to perform cryptographic operations for interaction with XPay.
Key generation
This command will create 2 files in a current directory. Send a public key to XPayua. Never share the private-key.
./bin/generate-keys
Usage
$privateKey = ''; // your private key $publicKey = ''; // key that you've got from XPayua $manager = new CryptManager(); $requestData = ['ID' => '']; $partner = [ 'PartnerToken' => 'TOKEN', // that you've got from XPayua 'OperationType' => 12345, // integer id of operation ]; $data = [ 'Partner' => $partner, 'Data' => $cryptManager->encrypt($requestData), 'KeyAES' => $cryptManager->getEncryptedAESKey($publicKey), 'Sign' => $cryptManager->getSignedKey($privateKey), ];