我已经安装了paynamics / paygate-sdk-php laravel软件包。向Paygate / paynamics发送请求时出错。示例代码:
$client = new \CoreProc\Paynamic`enter code here`s\Paygate\Client([
'merchant_id' => env('PAYGATE_MERCHANT_ID', null),
'merchant_key' => env('PAYGATE_MERCHANT_KEY', null),
'sandbox' => false,
'sandbox_url' => env('PAYGATE_SANDBOX_URL', null),
'production_url' => 'PRODUCTION URL',
'verify' => false
]);
$requestBody = new \CoreProc\Paynamics\Paygate\RequestBody([
'request_id' => substr(uniqid(), 1, 13),
'fname' => 'Paynamics',
'mname' => 'Paynamics',
'lname' => 'Buyer',
'address1' => '101 Oval St.',
'address2' => '101 Oval St.',
'city' => 'Pasig City',
'state' => 'Metro Manila',
'country' => 'PH',
'zip' => '1600',
// 'amount' => 100,
'email' => 'abcd@gmail.com',
'phone' => '+63 123 8745',
'secure3d' => '+63 987 123 4587',
'currency' => 'PHP',
'descriptor_note' => 'PayGate Sample Merchant',
'notification_url' => 'http://example.com/notify',
'response_url' => 'http://example.com/success',
'cancel_url' => 'http://example.com/cancel',
'mtac_url' => 'http://example.com/tnc',
'mlogo_url' => 'http://example.com/assets/logo.png',
]);
$items = new \CoreProc\Paynamics\Paygate\ItemGroup;
$items->amount = 100;
$requestBody->setItemGroup($items);
$client->send($requestBody);
// Paygate
// $client->responsivePayment($requestBody);
我出错了。 "Interface 'Coreproc\Paynamics\Paygate\Contracts\ResponseInterface' not found"