1. Go to this page and download the library: Download paypayopa/php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
paypayopa / php-sdk example snippets
use PayPay\OpenPaymentAPI\Models\CreateQrCodePayload;
$cqcp = new CreateQrCodePayload();
$cqcp->setMerchantPaymentId('Test123')->setRequestedAt()->setCodeType();
php
/*
.....initialize SDK
*/
use PayPay\OpenPaymentAPI\Models\AccountLinkPayload;
$payload = new AccountLinkPayload();
$payload
->setScopes(["direct_debit"])
->setRedirectUrl("https://merchant.domain/test/callback")
->setReferenceId(uniqid("TEST123"));
$resp = $client->user->createAccountLinkQrCode($payload);
$url=$resp['data']['linkQRCodeURL'];
echo $url.' ';
$nonce = $payload->getNonce();
/*
.... store nonce for later integrity checks in session or DB
*/