sample.php
1.26 KB
<?php
include(__DIR__ . "/PayPayManager.php");
try {
$paypay = new PayPayManager('m_GnxuOq6AcO_4HOl', 'LSRwZZqMS8jxIa56JnkKNtW0GUSWJCSsKt2JwPDw', 269480125409779712);
error_log(print_r($paypay, true), 3, '/var/www/html/debug.log');
// コード作成
// $response = $paypay->create_code('1', 100, 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.75 Mobile/14E5239e Safari/602.1');
// $merchant_payment_id = NULL;
// $code_id = NULL;
// $url = '';
// if ($response['resultInfo']['code'] == 'SUCCESS') {
// $url = $response['data']['url'];
// $merchant_payment_id = $response['data']['merchantPaymentId'];
// $code_id = $response['data']['codeId'];
// }
// error_log(print_r($response, true), 3, '/var/www/html/debug.log');
// // 決済情報取得
// $response = $paypay->get_payment_details(1);
// error_log(print_r($response, true), 3, '/var/www/html/debug.log');
// コード削除
// $response = $paypay->delete_code('04-rNtyNkmqva9KNakh');
// error_log(print_r($response, true), 3, '/var/www/html/debug.log');
// 決済取り消し
// $response = $paypay->cancel_payment(1);
// error_log(print_r($response, true), 3, '/var/www/html/debug.log');
} catch (Exception $e) {
}