500.0, 'date' => date('Y-m-d'), 'payeeAccount' => '40702...', 'payeeBankBic' => '044...', 'payeeInn' => '770...', 'payeeName' => 'Vendor 1', 'payerAccount' => '40702...', 'purpose' => 'Payment for goods', ], ], DataCollection::class) ); $baas->login('client-id', 'client-secret'); $response = $baas->send(new CreateRegistryRequest($payload)); $registryId = $response->dto()->id; echo "Registry Created: $registryId\n"; // 2. Sign Registry // In real life, you might need to sign the digest provided by the bank // or the registry content itself. This depends on the specific bank requirement. $signature = CmsSigner::sign( $registryId, // Example data file_get_contents('path/to/sign_cert.pem'), file_get_contents('path/to/sign_key.pem') ); $signatures = RegistrySignatureData::collect([ [ 'base64Encoded' => $signature, 'signatureType' => 'RSA', 'certificateUuid' => 'YOUR_CERT_UUID', ], ], DataCollection::class); $baas->send(new SignRegistryRequest($registryId, $signatures)); echo "Registry Signed.\n";