1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/PaymentDrivers/WePay/CreditCard.php
2021-06-11 18:30:39 +10:00

47 lines
1.0 KiB
PHP

<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\PaymentDrivers\WePay;
use App\PaymentDrivers\WePayPaymentDriver;
class CreditCard
{
public $wepay;
public function __construct(WePayPaymentDriver $wepay)
{
$this->wepay = $wepay;
}
public function authorizeView($data)
{
return render('gateways.wepay.authorize.authorize', $data);
}
public function authorizeResponse($data)
{
//https://developer.wepay.com/api/api-calls/credit_card#authorize
// authorize the credit card
$response = $this->wepay->request('credit_card/authorize', array(
'client_id' => $account_id,
'client_secret' => 'A vacation home rental',
'credit_card_id' => 'goods',
));
// display the response
print_r($response);
}
}