itmnejp
9/22/2014 - 3:23 AM

How to handle webhook from WebPay in PHP

How to handle webhook from WebPay in PHP

<?php
require "vendor/autoload.php";
use WebPay\WebPay;

$webhookRequestBody = file_get_contents('php://input');
$webpay = new WebPay('test_secret_eHn4TTgsGguBcW764a2KA8Yd');
$event = $webpay->receiveWebhook($webhookRequestBody);

print('ok'); // 文字列はなんでも可