1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #3796 from turbo124/v2

Implement Authorize.NET
This commit is contained in:
David Bomba 2020-06-10 22:51:32 +10:00 committed by GitHub
commit dda0df6b0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 1285 additions and 403 deletions

View File

@ -13,6 +13,7 @@ namespace App\Console;
use App\Jobs\Cron\RecurringInvoicesCron;
use App\Jobs\Ninja\AdjustEmailQuota;
use App\Jobs\Ninja\CheckDbStatus;
use App\Jobs\Util\ReminderJob;
use App\Jobs\Util\SendFailedEmails;
use App\Jobs\Util\UpdateExchangeRates;
@ -48,10 +49,13 @@ class Kernel extends ConsoleKernel
$schedule->job(new UpdateExchangeRates)->daily();
$schedule->job(new CheckDbStatus())->everyFiveMinutes();
/* Run hosted specific jobs */
if(Ninja::isHosted()) {
$schedule->job(new AdjustEmailQuota())->daily();
$schedule->job(new SendFailedEmails())->daily();
$schedule->job(new CheckDbStatus())->everyFiveMinutes();
}
/* Run queue's in shared hosting with this*/
if (Ninja::isSelfHost()) {

View File

@ -0,0 +1,11 @@
<?php
namespace App\Exceptions;
use Exception;
use Throwable;
class GenericPaymentDriverFailure extends Exception
{
// ..
}

View File

@ -11,6 +11,7 @@
namespace App\Exceptions;
use App\Exceptions\GenericPaymentDriverFailure;
use Exception;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Auth\AuthenticationException;
@ -115,8 +116,14 @@ class Handler extends ExceptionHandler
return response()->json(['message' => 'The given data was invalid.', 'errors' => $exception->validator->getMessageBag()], 422);
} elseif ($exception instanceof RelationNotFoundException && $request->expectsJson()) {
return response()->json(['message' => $exception->getMessage()], 400);
} elseif ($exception instanceof GenericPaymentDriverFailure && $request->expectsJson()) {
return response()->json(['message' => $exception->getMessage()], 400);
} elseif ($exception instanceof GenericPaymentDriverFailure) {
$data['message'] = $exception->getMessage();
return render('errors.layout', $data);
}
return parent::render($request, $exception);
}

View File

@ -15,6 +15,8 @@ use App\Events\Payment\Methods\MethodDeleted;
use App\Http\Controllers\Controller;
use App\Http\Requests\ClientPortal\CreatePaymentMethodRequest;
use App\Models\ClientGatewayToken;
use App\Models\GatewayType;
use App\PaymentDrivers\AuthorizePaymentDriver;
use App\Utils\Traits\MakesDates;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
@ -42,16 +44,8 @@ class PaymentMethodController extends Controller
{
$gateway = auth()->user()->client->getCreditCardGateway();
$data = [
'gateway' => $gateway,
'gateway_type_id' => 1,
'token' => false,
];
return $gateway->driver(auth()->user()->client)->authorizeView(GatewayType::CREDIT_CARD);
return $gateway
->driver(auth()->user()->client)
->setPaymentMethod('App\\PaymentDrivers\\Stripe\\ACH')
->authorizeView($data);
}
/**
@ -63,11 +57,9 @@ class PaymentMethodController extends Controller
public function store(Request $request)
{
$gateway = auth()->user()->client->getCreditCardGateway();
return $gateway->driver(auth()->user()->client)->authorizeResponseView($request->all());
return $gateway
->driver(auth()->user()->client)
->setPaymentMethod('App\\PaymentDrivers\\Stripe\\ACH')
->authorizeCreditCardResponse($request);
}
/**

View File

@ -466,11 +466,12 @@ class CompanyController extends BaseController
*/
public function destroy(DestroyCompanyRequest $request, Company $company)
{
$company_count = $company->account->companies->count();
$account = $company->account;
if ($company_count == 1) {
$company->company_users->each(function ($company_user) {
$company_user->user->forceDelete();
});
@ -482,11 +483,13 @@ class CompanyController extends BaseController
} else {
$company_id = $company->id;
$company->delete();
//If we are deleting the default companies, we'll need to make a new company the default.
if ($account->default_company_id == $company_id) {
$new_default_company = Company::whereAccountId($account->id)->first();
$account->default_company_id = $new_default_company->id;
$account->save();

View File

@ -12,7 +12,6 @@
namespace App\Http\Requests\Company;
use App\Http\Requests\Request;
use App\Models\Company;
class DestroyCompanyRequest extends Request
{

View File

@ -0,0 +1,56 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Jobs\Ninja;
use App\Helpers\Email\InvoiceEmail;
use App\Jobs\Invoice\EmailInvoice;
use App\Libraries\MultiDB;
use App\Models\Account;
use App\Models\SystemLog;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Turbo124\Beacon\Jobs\Database\MySQL\DbStatus;
class CheckDbStatus implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
info("checking db status");
DbStatus::dispatch('db-ninja-01', 'db.status.db-ninja-01');
DbStatus::dispatch('db-ninja-02', 'db.status.db-ninja-02');
}
}

View File

@ -25,4 +25,14 @@ class ClientContactPresenter extends EntityPresenter
{
return $this->entity->first_name . ' ' . $this->entity->last_name;
}
public function first_name()
{
return $this->entity->first_name ?: '';
}
public function last_name()
{
return $this->entity->last_name ?: '';
}
}

View File

@ -0,0 +1,23 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\PaymentDrivers;
abstract class AbstractPaymentDriver
{
abstract public function authorize($payment_method);
abstract public function purchase();
abstract public function refund();
}

View File

@ -0,0 +1,89 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\PaymentDrivers\Authorize;
use App\Exceptions\GenericPaymentDriverFailure;
use App\Models\Client;
use App\Models\GatewayType;
use App\PaymentDrivers\AuthorizePaymentDriver;
use net\authorize\api\constants\ANetEnvironment;
use net\authorize\api\contract\v1\CreateCustomerProfileRequest;
use net\authorize\api\contract\v1\CustomerAddressType;
use net\authorize\api\contract\v1\CustomerPaymentProfileType;
use net\authorize\api\contract\v1\CustomerProfileType;
use net\authorize\api\controller\CreateCustomerProfileController;
/**
* Class BaseDriver
* @package App\PaymentDrivers
*
*/
class AuthorizeCreateCustomer
{
public $authorize;
public $client;
public function __construct(AuthorizePaymentDriver $authorize, Client $client)
{
$this->authorize = $authorize;
$this->client = $client;
}
public function create($data = null)
{
error_reporting (E_ALL & ~E_DEPRECATED);
$this->authorize->init();
// Create the Bill To info for new payment type
$contact = $this->client->primary_contact()->first();
$refId = 'ref' . time();
// Create a new CustomerProfileType and add the payment profile object
$customerProfile = new CustomerProfileType();
$customerProfile->setDescription($this->client->present()->name());
$customerProfile->setMerchantCustomerId("M_" . time());
$customerProfile->setEmail($this->client->present()->email());
// Assemble the complete transaction request
$request = new CreateCustomerProfileRequest();
$request->setMerchantAuthentication($this->authorize->merchant_authentication);
$request->setRefId($refId);
$request->setProfile($customerProfile);
// Create the controller and get the response
$controller = new CreateCustomerProfileController($request);
$response = $controller->executeWithApiResponse($this->authorize->mode());
if (($response != null) && ($response->getMessages()->getResultCode() == "Ok")) {
return $response->getCustomerProfileId();
} else {
$errorMessages = $response->getMessages()->getMessage();
$message = "Unable to add customer to Authorize.net gateway";
if(is_array($errorMessages))
$message = $errorMessages[0]->getCode() . " " .$errorMessages[0]->getText();
throw new GenericPaymentDriverFailure($message);
}
}
}

View File

@ -0,0 +1,267 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\PaymentDrivers\Authorize;
use App\Exceptions\GenericPaymentDriverFailure;
use App\Models\ClientGatewayToken;
use App\Models\GatewayType;
use App\PaymentDrivers\AuthorizePaymentDriver;
use App\PaymentDrivers\Authorize\AuthorizeCreateCustomer;
use net\authorize\api\contract\v1\CreateCustomerPaymentProfileRequest;
use net\authorize\api\contract\v1\CreateCustomerProfileRequest;
use net\authorize\api\contract\v1\CustomerAddressType;
use net\authorize\api\contract\v1\CustomerPaymentProfileType;
use net\authorize\api\contract\v1\CustomerProfileType;
use net\authorize\api\contract\v1\GetCustomerPaymentProfileRequest;
use net\authorize\api\contract\v1\OpaqueDataType;
use net\authorize\api\contract\v1\PaymentType;
use net\authorize\api\controller\CreateCustomerPaymentProfileController;
use net\authorize\api\controller\CreateCustomerProfileController;
use net\authorize\api\controller\GetCustomerPaymentProfileController;
/**
* Class AuthorizePaymentMethod
* @package App\PaymentDrivers\AuthorizePaymentMethod
*
*/
class AuthorizePaymentMethod
{
public $authorize;
public $payment_method;
public function __construct(AuthorizePaymentDriver $authorize)
{
$this->authorize = $authorize;
}
public function authorizeView($payment_method)
{
$this->payment_method = $payment_method;
switch ($payment_method) {
case GatewayType::CREDIT_CARD:
return $this->authorizeCreditCard();
break;
case GatewayType::BANK_TRANSFER:
return $this->authorizeBankTransfer();
break;
default:
# code...
break;
}
}
public function authorizeResponseView($payment_method, $data)
{
$this->payment_method = $payment_method;
switch ($payment_method) {
case GatewayType::CREDIT_CARD:
return $this->authorizeCreditCardResponse($data);
break;
case GatewayType::BANK_TRANSFER:
return $this->authorizeBankTransferResponse($data);
break;
default:
# code...
break;
}
}
public function authorizeCreditCard()
{
$data['gateway'] = $this->authorize->company_gateway;
$data['public_client_id'] = $this->authorize->init()->getPublicClientKey();
$data['api_login_id'] = $this->authorize->company_gateway->getConfigField('apiLoginId');
return render('gateways.authorize.add_credit_card', $data);
}
public function authorizeBankTransfer()
{
}
public function authorizeCreditCardResponse($data)
{
$client_profile_id = null;
if($client_gateway_token = $this->authorize->findClientGatewayRecord()){
info("i found a company gateway record");
$payment_profile = $this->addPaymentMethodToClient($client_gateway_token->gateway_customer_reference, $data);
}
else{
$gateway_customer_reference = (new AuthorizeCreateCustomer($this->authorize, $this->authorize->client))->create($data);
info($gateway_customer_reference);
$payment_profile = $this->addPaymentMethodToClient($gateway_customer_reference, $data);
}
$this->createClientGatewayToken($payment_profile, $gateway_customer_reference);
return redirect()->route('client.payment_methods.index');
}
public function authorizeBankTransferResponse($data)
{
}
private function createClientGatewayToken($payment_profile, $gateway_customer_reference)
{
info(print_r($payment_profile,1));
$client_gateway_token = new ClientGatewayToken();
$client_gateway_token->company_id = $this->authorize->client->company_id;
$client_gateway_token->client_id = $this->authorize->client->id;
$client_gateway_token->token = $payment_profile->getPaymentProfile()->getCustomerPaymentProfileId();
$client_gateway_token->company_gateway_id = $this->authorize->company_gateway->id;
$client_gateway_token->gateway_type_id = $this->payment_method;
$client_gateway_token->gateway_customer_reference = $gateway_customer_reference;
$client_gateway_token->meta = $this->buildPaymentMethod($payment_profile);
$client_gateway_token->save();
}
public function buildPaymentMethod($payment_profile)
{
$payment_meta = new \stdClass;
$payment_meta->exp_month = 'xx';
$payment_meta->exp_year = 'xx';
$payment_meta->brand = $payment_profile->getPaymentProfile()->getPayment()->getCreditCard()->getCardType();
$payment_meta->last4 = $payment_profile->getPaymentProfile()->getPayment()->getCreditCard()->getCardNumber();
$payment_meta->type = $this->payment_method;
return $payment_meta;
}
private function addPaymentMethodToClient($gateway_customer_reference, $data)
{
error_reporting (E_ALL & ~E_DEPRECATED);
$this->authorize->init();
// Set the transaction's refId
$refId = 'ref' . time();
// Set the payment data for the payment profile to a token obtained from Accept.js
$op = new OpaqueDataType();
$op->setDataDescriptor($data['dataDescriptor']);
$op->setDataValue($data['dataValue']);
$paymentOne = new PaymentType();
$paymentOne->setOpaqueData($op);
$contact = $this->authorize->client->primary_contact()->first();
if($contact){
// Create the Bill To info for new payment type
$billto = new CustomerAddressType();
$billto->setFirstName($contact->present()->first_name());
$billto->setLastName($contact->present()->last_name());
$billto->setCompany($this->authorize->client->present()->name());
$billto->setAddress($this->authorize->client->address1);
$billto->setCity($this->authorize->client->city);
$billto->setState($this->authorize->client->state);
$billto->setZip($this->authorize->client->postal_code);
if($this->authorize->client->country_id)
$billto->setCountry($this->authorize->client->country->name);
$billto->setPhoneNumber($this->authorize->client->phone);
}
// Create a new Customer Payment Profile object
$paymentprofile = new CustomerPaymentProfileType();
$paymentprofile->setCustomerType('individual');
if($billto)
$paymentprofile->setBillTo($billto);
$paymentprofile->setPayment($paymentOne);
$paymentprofile->setDefaultPaymentProfile(true);
$paymentprofiles[] = $paymentprofile;
// Assemble the complete transaction request
$paymentprofilerequest = new CreateCustomerPaymentProfileRequest();
$paymentprofilerequest->setMerchantAuthentication($this->authorize->merchant_authentication);
// Add an existing profile id to the request
$paymentprofilerequest->setCustomerProfileId($gateway_customer_reference);
$paymentprofilerequest->setPaymentProfile($paymentprofile);
$paymentprofilerequest->setValidationMode("liveMode");
// Create the controller and get the response
$controller = new CreateCustomerPaymentProfileController($paymentprofilerequest);
$response = $controller->executeWithApiResponse($this->authorize->mode());
if (($response != null) && ($response->getMessages()->getResultCode() == "Ok") ) {
return $this->getPaymentProfile($gateway_customer_reference, $response->getCustomerPaymentProfileId());
} else {
$errorMessages = $response->getMessages()->getMessage();
$message = "Unable to add customer to Authorize.net gateway";
if(is_array($errorMessages))
$message = $errorMessages[0]->getCode() . " " .$errorMessages[0]->getText();
throw new GenericPaymentDriverFailure($message);
}
}
public function getPaymentProfile($gateway_customer_reference, $payment_profile_id)
{
error_reporting (E_ALL & ~E_DEPRECATED);
$this->authorize->init();
// Set the transaction's refId
$refId = 'ref' . time();
//request requires customerProfileId and customerPaymentProfileId
$request = new GetCustomerPaymentProfileRequest();
$request->setMerchantAuthentication($this->authorize->merchant_authentication);
$request->setRefId($refId);
$request->setCustomerProfileId($gateway_customer_reference);
$request->setCustomerPaymentProfileId($payment_profile_id);
$controller = new GetCustomerPaymentProfileController($request);
$response = $controller->executeWithApiResponse($this->authorize->mode());
if(($response != null) && ($response->getMessages()->getResultCode() == "Ok")) {
return $response;
}
else if($response){
$errorMessages = $response->getMessages()->getMessage();
$message = "Unable to add payment method to Authorize.net gateway";
if(is_array($errorMessages))
$message = $errorMessages[0]->getCode() . " " .$errorMessages[0]->getText();
throw new GenericPaymentDriverFailure($message);
}
else
throw new GenericPaymentDriverFailure("Error communicating with Authorize.net");
}
}

View File

@ -1,109 +0,0 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\PaymentDrivers;
use App\Events\Payment\PaymentWasCreated;
use App\Factory\PaymentFactory;
use App\Jobs\Mail\PaymentFailureMailer;
use App\Jobs\Util\SystemLogger;
use App\Models\ClientGatewayToken;
use App\Models\GatewayType;
use App\Models\Invoice;
use App\Models\Payment;
use App\Models\PaymentType;
use App\Models\SystemLog;
use App\PaymentDrivers\Stripe\Utilities;
use App\Utils\Traits\MakesHash;
use Illuminate\Http\Request;
use Illuminate\Support\Carbon;
use Stripe\PaymentIntent;
use Stripe\SetupIntent;
use Stripe\Stripe;
class AuthorizeNetAIMPaymentDriver extends BasePaymentDriver
{
use MakesHash;
protected $refundable = true;
protected $token_billing = true;
protected $can_authorise_credit_card = true;
protected $transactionReferenceParam = 'refId';
/**
* Returns the gateway types
*/
public function gatewayTypes() :array
{
$types = [
GatewayType::CREDIT_CARD,
];
return $types;
}
public function viewForType($gateway_type_id)
{
switch ($gateway_type_id) {
case GatewayType::CREDIT_CARD:
case GatewayType::TOKEN:
return 'gateways.authorize.credit_card';
break;
default:
break;
}
}
public function getLoginId()
{
return $this->company_gateway->getConfigField('apiLoginId');
}
public function getTransactionKey()
{
return $this->company_gateway->getConfigField('transactionKey');
}
public function authorizeView(array $data)
{
$data['gateway'] = $this->gateway;
return render($this->viewForType(GatewayType::CREDIT_CARD), $data);
}
public function authorizeCreditCardResponse($request)
{
$request = $gateway->authorize(
[
'amount' => 0,
'opaqueDataDescriptor' => $request->input('dataDescriptor'),
'opaqueDataValue' => $request->input('dataValue'),
]
);
$response = $request->send();
$data = $response->getData();
info($data);
$data['paymentProfile']['customerProfileId'];
$data['paymentProfile']['customerPaymentProfileId'];
}
}

View File

@ -0,0 +1,116 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\PaymentDrivers;
use App\Models\ClientGatewayToken;
use App\Models\GatewayType;
use App\PaymentDrivers\Authorize\AuthorizeCreditCard;
use App\PaymentDrivers\Authorize\AuthorizePaymentMethod;
use net\authorize\api\constants\ANetEnvironment;
use net\authorize\api\contract\v1\CreateTransactionRequest;
use net\authorize\api\contract\v1\GetMerchantDetailsRequest;
use net\authorize\api\contract\v1\MerchantAuthenticationType;
use net\authorize\api\controller\CreateTransactionController;
use net\authorize\api\controller\GetMerchantDetailsController;
/**
* Class BaseDriver
* @package App\PaymentDrivers
*
*/
class AuthorizePaymentDriver extends BaseDriver
{
public $merchant_authentication;
/**
* Returns the gateway types
*/
public function gatewayTypes() :array
{
$types = [
GatewayType::CREDIT_CARD,
];
return $types;
}
public function init()
{
error_reporting (E_ALL & ~E_DEPRECATED);
$this->merchant_authentication = new MerchantAuthenticationType();
$this->merchant_authentication->setName($this->company_gateway->getConfigField('apiLoginId'));
$this->merchant_authentication->setTransactionKey($this->company_gateway->getConfigField('transactionKey'));
return $this;
}
public function getPublicClientKey()
{
$request = new GetMerchantDetailsRequest();
$request->setMerchantAuthentication($this->merchant_authentication);
$controller = new GetMerchantDetailsController($request);
$response = $controller->executeWithApiResponse($this->mode());
return $response->getPublicClientKey();
}
public function mode()
{
if($this->company_gateway->getConfigField('testMode'))
return ANetEnvironment::SANDBOX;
return $env = ANetEnvironment::PRODUCTION;
}
public function authorizeView($payment_method)
{
return (new AuthorizePaymentMethod($this))->authorizeView($payment_method);
}
public function authorizeResponseView(array $data)
{
return (new AuthorizePaymentMethod($this))->authorizeResponseView($data['gateway_type_id'], $data);
}
public function authorize($payment_method)
{
}
public function purchase()
{
}
public function refund()
{
}
public function findClientGatewayRecord() :?ClientGatewayToken
{
return ClientGatewayToken::where('client_id', $this->client->id)
->where('company_gateway_id', $this->company_gateway->id)
->first();
}
}

View File

@ -0,0 +1,63 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\PaymentDrivers;
use App\Models\Client;
use App\Models\CompanyGateway;
use App\PaymentDrivers\AbstractPaymentDriver;
use App\Utils\Traits\MakesHash;
use App\Utils\Traits\SystemLogTrait;
use Omnipay\Omnipay;
/**
* Class BaseDriver
* @package App\PaymentDrivers
*
*/
class BaseDriver extends AbstractPaymentDriver
{
use SystemLogTrait;
use MakesHash;
/* The company gateway instance*/
public $company_gateway;
/* The Invitation */
protected $invitation;
/* Gateway capabilities */
protected $refundable = false;
/* Token billing */
protected $token_billing = false;
/* Authorise payment methods */
protected $can_authorise_credit_card = false;
public function __construct(CompanyGateway $company_gateway, Client $client = null, $invitation = false)
{
$this->company_gateway = $company_gateway;
$this->invitation = $invitation;
$this->client = $client;
}
public function authorize($payment_method) {}
public function purchase() {}
public function refund() {}
}

348
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "e34e27d2c285356d9251ab97646caf69",
"content-hash": "723f03b92457a3f3410083e2b42f96c3",
"packages": [
{
"name": "asgrim/ofxparser",
@ -64,16 +64,16 @@
},
{
"name": "aws/aws-sdk-php",
"version": "3.138.10",
"version": "3.140.4",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "cf197a033ad75cd9e3a90a207cf5ec8935aafa48"
"reference": "298ec070adad5760c4b90348219bb3e6bd7a9322"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/cf197a033ad75cd9e3a90a207cf5ec8935aafa48",
"reference": "cf197a033ad75cd9e3a90a207cf5ec8935aafa48",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/298ec070adad5760c4b90348219bb3e6bd7a9322",
"reference": "298ec070adad5760c4b90348219bb3e6bd7a9322",
"shasum": ""
},
"require": {
@ -144,7 +144,7 @@
"s3",
"sdk"
],
"time": "2020-05-28T18:12:07+00:00"
"time": "2020-06-09T18:11:16+00:00"
},
{
"name": "beganovich/omnipay-checkout",
@ -367,16 +367,16 @@
},
{
"name": "composer/composer",
"version": "1.10.6",
"version": "1.10.7",
"source": {
"type": "git",
"url": "https://github.com/composer/composer.git",
"reference": "be81b9c4735362c26876bdbfd3b5bc7e7f711c88"
"reference": "956608ea4f7de9e58c53dfb019d85ae62b193c39"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/composer/zipball/be81b9c4735362c26876bdbfd3b5bc7e7f711c88",
"reference": "be81b9c4735362c26876bdbfd3b5bc7e7f711c88",
"url": "https://api.github.com/repos/composer/composer/zipball/956608ea4f7de9e58c53dfb019d85ae62b193c39",
"reference": "956608ea4f7de9e58c53dfb019d85ae62b193c39",
"shasum": ""
},
"require": {
@ -384,7 +384,7 @@
"composer/semver": "^1.0",
"composer/spdx-licenses": "^1.2",
"composer/xdebug-handler": "^1.1",
"justinrainbow/json-schema": "^3.0 || ^4.0 || ^5.0",
"justinrainbow/json-schema": "^5.2.10",
"php": "^5.3.2 || ^7.0",
"psr/log": "^1.0",
"seld/jsonlint": "^1.4",
@ -449,12 +449,16 @@
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2020-05-06T08:28:10+00:00"
"time": "2020-06-03T08:03:56+00:00"
},
{
"name": "composer/package-versions-deprecated",
@ -644,16 +648,16 @@
},
{
"name": "composer/xdebug-handler",
"version": "1.4.1",
"version": "1.4.2",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
"reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7"
"reference": "fa2aaf99e2087f013a14f7432c1cd2dd7d8f1f51"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/1ab9842d69e64fb3a01be6b656501032d1b78cb7",
"reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/fa2aaf99e2087f013a14f7432c1cd2dd7d8f1f51",
"reference": "fa2aaf99e2087f013a14f7432c1cd2dd7d8f1f51",
"shasum": ""
},
"require": {
@ -688,9 +692,17 @@
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2020-03-01T12:26:26+00:00"
"time": "2020-06-04T11:16:35+00:00"
},
{
"name": "czproject/git-php",
@ -1021,20 +1033,6 @@
"sqlserver",
"sqlsrv"
],
"funding": [
{
"url": "https://www.doctrine-project.org/sponsorship.html",
"type": "custom"
},
{
"url": "https://www.patreon.com/phpdoctrine",
"type": "patreon"
},
{
"url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal",
"type": "tidelift"
}
],
"time": "2020-04-20T17:19:26+00:00"
},
{
@ -1603,22 +1601,22 @@
},
{
"name": "google/apiclient",
"version": "v2.4.1",
"version": "v2.5.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-api-php-client.git",
"reference": "1fdfe942f9aaf3064e621834a5e3047fccb3a6da"
"reference": "9ab9cc07f66e2c7274ea2753f102ae24d1271410"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/1fdfe942f9aaf3064e621834a5e3047fccb3a6da",
"reference": "1fdfe942f9aaf3064e621834a5e3047fccb3a6da",
"url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/9ab9cc07f66e2c7274ea2753f102ae24d1271410",
"reference": "9ab9cc07f66e2c7274ea2753f102ae24d1271410",
"shasum": ""
},
"require": {
"firebase/php-jwt": "~2.0||~3.0||~4.0||~5.0",
"google/apiclient-services": "~0.13",
"google/auth": "^1.0",
"google/auth": "^1.9",
"guzzlehttp/guzzle": "~5.3.1||~6.0",
"guzzlehttp/psr7": "^1.2",
"monolog/monolog": "^1.17|^2.0",
@ -1660,20 +1658,20 @@
"keywords": [
"google"
],
"time": "2020-03-26T15:30:32+00:00"
"time": "2020-05-26T22:29:38+00:00"
},
{
"name": "google/apiclient-services",
"version": "v0.137",
"version": "v0.139",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-api-php-client-services.git",
"reference": "92ae53e812037230b23d373bac12516f90c330cc"
"reference": "84e99f792cae7bd92b8b54c75b0ad3502d628db6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/92ae53e812037230b23d373bac12516f90c330cc",
"reference": "92ae53e812037230b23d373bac12516f90c330cc",
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/84e99f792cae7bd92b8b54c75b0ad3502d628db6",
"reference": "84e99f792cae7bd92b8b54c75b0ad3502d628db6",
"shasum": ""
},
"require": {
@ -1697,7 +1695,7 @@
"keywords": [
"google"
],
"time": "2020-05-25T00:24:28+00:00"
"time": "2020-06-08T00:24:31+00:00"
},
{
"name": "google/auth",
@ -2381,16 +2379,16 @@
},
{
"name": "laravel/framework",
"version": "v6.18.16",
"version": "v6.18.19",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "73f18a6bc58fb91aa83925161db25aa3674b73e9"
"reference": "69321afec31f4a908112e5dc8995fc91024fd971"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/73f18a6bc58fb91aa83925161db25aa3674b73e9",
"reference": "73f18a6bc58fb91aa83925161db25aa3674b73e9",
"url": "https://api.github.com/repos/laravel/framework/zipball/69321afec31f4a908112e5dc8995fc91024fd971",
"reference": "69321afec31f4a908112e5dc8995fc91024fd971",
"shasum": ""
},
"require": {
@ -2401,7 +2399,7 @@
"ext-mbstring": "*",
"ext-openssl": "*",
"league/commonmark": "^1.3",
"league/flysystem": "^1.0.8",
"league/flysystem": "^1.0.34",
"monolog/monolog": "^1.12|^2.0",
"nesbot/carbon": "^2.0",
"opis/closure": "^3.1",
@ -2524,7 +2522,7 @@
"framework",
"laravel"
],
"time": "2020-05-26T14:31:44+00:00"
"time": "2020-06-09T13:59:34+00:00"
},
{
"name": "laravel/slack-notification-channel",
@ -2585,29 +2583,30 @@
},
{
"name": "laravel/socialite",
"version": "v4.3.2",
"version": "v4.4.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/socialite.git",
"reference": "4bd66ee416fea04398dee5b8c32d65719a075db4"
"reference": "80951df0d93435b773aa00efe1fad6d5015fac75"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/socialite/zipball/4bd66ee416fea04398dee5b8c32d65719a075db4",
"reference": "4bd66ee416fea04398dee5b8c32d65719a075db4",
"url": "https://api.github.com/repos/laravel/socialite/zipball/80951df0d93435b773aa00efe1fad6d5015fac75",
"reference": "80951df0d93435b773aa00efe1fad6d5015fac75",
"shasum": ""
},
"require": {
"ext-json": "*",
"guzzlehttp/guzzle": "~6.0",
"guzzlehttp/guzzle": "^6.0|^7.0",
"illuminate/http": "~5.7.0|~5.8.0|^6.0|^7.0",
"illuminate/support": "~5.7.0|~5.8.0|^6.0|^7.0",
"league/oauth1-client": "~1.0",
"league/oauth1-client": "^1.0",
"php": "^7.1.3"
},
"require-dev": {
"illuminate/contracts": "~5.7.0|~5.8.0|^6.0|^7.0",
"mockery/mockery": "^1.0",
"orchestra/testbench": "^3.7|^3.8|^4.0|^5.0",
"phpunit/phpunit": "^7.0|^8.0"
},
"type": "library",
@ -2645,7 +2644,7 @@
"laravel",
"oauth"
],
"time": "2020-02-04T15:30:01+00:00"
"time": "2020-06-03T13:30:03+00:00"
},
{
"name": "laravel/tinker",
@ -2902,16 +2901,16 @@
},
{
"name": "league/flysystem-aws-s3-v3",
"version": "1.0.24",
"version": "1.0.25",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git",
"reference": "4382036bde5dc926f9b8b337e5bdb15e5ec7b570"
"reference": "d409b97a50bf85fbde30cbc9fc10237475e696ea"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/4382036bde5dc926f9b8b337e5bdb15e5ec7b570",
"reference": "4382036bde5dc926f9b8b337e5bdb15e5ec7b570",
"url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/d409b97a50bf85fbde30cbc9fc10237475e696ea",
"reference": "d409b97a50bf85fbde30cbc9fc10237475e696ea",
"shasum": ""
},
"require": {
@ -2945,7 +2944,7 @@
}
],
"description": "Flysystem adapter for the AWS S3 SDK v3.x",
"time": "2020-02-23T13:31:58+00:00"
"time": "2020-06-02T18:41:58+00:00"
},
{
"name": "league/flysystem-cached-adapter",
@ -3236,22 +3235,22 @@
},
{
"name": "livewire/livewire",
"version": "v1.1.0",
"version": "v1.2.0",
"source": {
"type": "git",
"url": "https://github.com/livewire/livewire.git",
"reference": "ee22192220ca7b4f50dec2b0b6ea4da9e49ccf11"
"reference": "874ba1b8d6b12efa472147697942fe2f78a5d371"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/livewire/livewire/zipball/ee22192220ca7b4f50dec2b0b6ea4da9e49ccf11",
"reference": "ee22192220ca7b4f50dec2b0b6ea4da9e49ccf11",
"url": "https://api.github.com/repos/livewire/livewire/zipball/874ba1b8d6b12efa472147697942fe2f78a5d371",
"reference": "874ba1b8d6b12efa472147697942fe2f78a5d371",
"shasum": ""
},
"require": {
"illuminate/database": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0",
"illuminate/support": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0",
"illuminate/validation": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0",
"illuminate/database": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0",
"illuminate/support": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0",
"illuminate/validation": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0",
"php": "^7.1.3",
"symfony/http-kernel": "^4.0|^5.0"
},
@ -3295,7 +3294,7 @@
"type": "github"
}
],
"time": "2020-05-13T15:22:11+00:00"
"time": "2020-06-08T15:12:38+00:00"
},
{
"name": "maennchen/zipstream-php",
@ -3719,16 +3718,16 @@
},
{
"name": "nikic/php-parser",
"version": "v4.4.0",
"version": "v4.5.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120"
"reference": "53c2753d756f5adb586dca79c2ec0e2654dd9463"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120",
"reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/53c2753d756f5adb586dca79c2ec0e2654dd9463",
"reference": "53c2753d756f5adb586dca79c2ec0e2654dd9463",
"shasum": ""
},
"require": {
@ -3767,7 +3766,7 @@
"parser",
"php"
],
"time": "2020-04-10T16:34:50+00:00"
"time": "2020-06-03T07:24:19+00:00"
},
{
"name": "nwidart/laravel-modules",
@ -3840,82 +3839,18 @@
],
"time": "2019-11-12T18:38:48+00:00"
},
{
"name": "omnipay/authorizenet",
"version": "3.3.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/omnipay-authorizenet.git",
"reference": "8ccce3190c00d0a129c62dc1d1451d0125bab640"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/omnipay-authorizenet/zipball/8ccce3190c00d0a129c62dc1d1451d0125bab640",
"reference": "8ccce3190c00d0a129c62dc1d1451d0125bab640",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-libxml": "*",
"ext-simplexml": "*",
"omnipay/common": "^3"
},
"require-dev": {
"omnipay/tests": "^3",
"phpro/grumphp": "^0.14",
"squizlabs/php_codesniffer": "^3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Omnipay\\AuthorizeNet\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Adrian Macneil",
"email": "adrian@adrianmacneil.com"
},
{
"name": "Omnipay Contributors",
"homepage": "https://github.com/thephpleague/omnipay-authorizenet/contributors"
}
],
"description": "Authorize.Net gateway for the Omnipay payment processing library",
"homepage": "https://github.com/thephpleague/omnipay-authorizenet",
"keywords": [
"authorize",
"authorize net",
"authorize.net",
"gateway",
"merchant",
"omnipay",
"pay",
"payment"
],
"time": "2019-04-27T22:33:23+00:00"
},
{
"name": "omnipay/common",
"version": "v3.0.3",
"version": "v3.0.4",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/omnipay-common.git",
"reference": "24ea70aa6e0f76d8b85d7a35d8a6560c746f566f"
"reference": "d6a1bed63cae270da32b2171fe31f820d334d452"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/omnipay-common/zipball/24ea70aa6e0f76d8b85d7a35d8a6560c746f566f",
"reference": "24ea70aa6e0f76d8b85d7a35d8a6560c746f566f",
"url": "https://api.github.com/repos/thephpleague/omnipay-common/zipball/d6a1bed63cae270da32b2171fe31f820d334d452",
"reference": "d6a1bed63cae270da32b2171fe31f820d334d452",
"shasum": ""
},
"require": {
@ -3984,7 +3919,7 @@
"payment",
"purchase"
],
"time": "2020-02-12T12:28:23+00:00"
"time": "2020-06-02T05:57:19+00:00"
},
{
"name": "omnipay/paypal",
@ -4107,16 +4042,16 @@
},
{
"name": "opis/closure",
"version": "3.5.3",
"version": "3.5.4",
"source": {
"type": "git",
"url": "https://github.com/opis/closure.git",
"reference": "cac47092144043d5d676e2e7cf8d0d2f83fc89ca"
"reference": "1d0deef692f66dae5d70663caee2867d0971306b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/opis/closure/zipball/cac47092144043d5d676e2e7cf8d0d2f83fc89ca",
"reference": "cac47092144043d5d676e2e7cf8d0d2f83fc89ca",
"url": "https://api.github.com/repos/opis/closure/zipball/1d0deef692f66dae5d70663caee2867d0971306b",
"reference": "1d0deef692f66dae5d70663caee2867d0971306b",
"shasum": ""
},
"require": {
@ -4164,7 +4099,7 @@
"serialization",
"serialize"
],
"time": "2020-05-25T09:32:45+00:00"
"time": "2020-06-07T11:41:29+00:00"
},
{
"name": "paragonie/random_compat",
@ -4636,16 +4571,16 @@
},
{
"name": "phpoption/phpoption",
"version": "1.7.3",
"version": "1.7.4",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/php-option.git",
"reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae"
"reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/schmittjoh/php-option/zipball/4acfd6a4b33a509d8c88f50e5222f734b6aeebae",
"reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae",
"url": "https://api.github.com/repos/schmittjoh/php-option/zipball/b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3",
"reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3",
"shasum": ""
},
"require": {
@ -4687,7 +4622,17 @@
"php",
"type"
],
"time": "2020-03-21T18:07:53+00:00"
"funding": [
{
"url": "https://github.com/GrahamCampbell",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption",
"type": "tidelift"
}
],
"time": "2020-06-07T10:40:07+00:00"
},
{
"name": "phpseclib/phpseclib",
@ -5736,16 +5681,16 @@
},
{
"name": "sentry/sentry-laravel",
"version": "1.7.1",
"version": "1.8.0",
"source": {
"type": "git",
"url": "https://github.com/getsentry/sentry-laravel.git",
"reference": "8ec4695c5c6fa28d952c0f361e02997e84920354"
"reference": "912731d2b704fb6a97cef89c7a8b5c367cbf6088"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/8ec4695c5c6fa28d952c0f361e02997e84920354",
"reference": "8ec4695c5c6fa28d952c0f361e02997e84920354",
"url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/912731d2b704fb6a97cef89c7a8b5c367cbf6088",
"reference": "912731d2b704fb6a97cef89c7a8b5c367cbf6088",
"shasum": ""
},
"require": {
@ -5811,7 +5756,7 @@
"type": "custom"
}
],
"time": "2020-04-01T10:30:44+00:00"
"time": "2020-06-02T12:39:20+00:00"
},
{
"name": "spatie/browsershot",
@ -5867,12 +5812,6 @@
"screenshot",
"webpage"
],
"funding": [
{
"url": "https://www.patreon.com/spatie",
"type": "patreon"
}
],
"time": "2020-04-20T10:33:41+00:00"
},
{
@ -5981,16 +5920,16 @@
},
{
"name": "spatie/temporary-directory",
"version": "1.2.2",
"version": "1.2.3",
"source": {
"type": "git",
"url": "https://github.com/spatie/temporary-directory.git",
"reference": "fcb127e615700751dac2aefee0ea2808ff3f5bb1"
"reference": "eeb84a7a3543e90759cd852ccb468e3d3340d99d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/temporary-directory/zipball/fcb127e615700751dac2aefee0ea2808ff3f5bb1",
"reference": "fcb127e615700751dac2aefee0ea2808ff3f5bb1",
"url": "https://api.github.com/repos/spatie/temporary-directory/zipball/eeb84a7a3543e90759cd852ccb468e3d3340d99d",
"reference": "eeb84a7a3543e90759cd852ccb468e3d3340d99d",
"shasum": ""
},
"require": {
@ -6023,7 +5962,7 @@
"spatie",
"temporary-directory"
],
"time": "2019-12-15T18:52:09+00:00"
"time": "2020-06-08T08:58:45+00:00"
},
{
"name": "staudenmeir/eloquent-has-many-deep",
@ -6070,16 +6009,16 @@
},
{
"name": "stripe/stripe-php",
"version": "v7.36.1",
"version": "v7.37.0",
"source": {
"type": "git",
"url": "https://github.com/stripe/stripe-php.git",
"reference": "80979c8959dff86bf7b0610e44599a67132ebcd3"
"reference": "246871743edb26c7a7657784205218daf7d99a73"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/80979c8959dff86bf7b0610e44599a67132ebcd3",
"reference": "80979c8959dff86bf7b0610e44599a67132ebcd3",
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/246871743edb26c7a7657784205218daf7d99a73",
"reference": "246871743edb26c7a7657784205218daf7d99a73",
"shasum": ""
},
"require": {
@ -6123,7 +6062,7 @@
"payment processing",
"stripe"
],
"time": "2020-05-28T18:11:30+00:00"
"time": "2020-06-09T22:55:43+00:00"
},
{
"name": "swiftmailer/swiftmailer",
@ -8249,16 +8188,16 @@
},
{
"name": "turbo124/beacon",
"version": "0.8.2",
"version": "0.83",
"source": {
"type": "git",
"url": "https://github.com/turbo124/beacon.git",
"reference": "2797b47faf30a3595e8ce5f5ad8e79e49989cc9a"
"reference": "97157e507fcca352d1cc445b8a3a1970ec448eee"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/turbo124/beacon/zipball/2797b47faf30a3595e8ce5f5ad8e79e49989cc9a",
"reference": "2797b47faf30a3595e8ce5f5ad8e79e49989cc9a",
"url": "https://api.github.com/repos/turbo124/beacon/zipball/97157e507fcca352d1cc445b8a3a1970ec448eee",
"reference": "97157e507fcca352d1cc445b8a3a1970ec448eee",
"shasum": ""
},
"require": {
@ -8305,31 +8244,31 @@
"lightlogs",
"turbo124"
],
"time": "2020-05-08T00:53:52+00:00"
"time": "2020-06-09T07:24:25+00:00"
},
{
"name": "vlucas/phpdotenv",
"version": "v3.6.5",
"version": "v3.6.6",
"source": {
"type": "git",
"url": "https://github.com/vlucas/phpdotenv.git",
"reference": "8b64814b356b96a90d2bc942b152c80d8888b8d4"
"reference": "4669484ccbc38fe7c4e0c50456778f2010566aad"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/8b64814b356b96a90d2bc942b152c80d8888b8d4",
"reference": "8b64814b356b96a90d2bc942b152c80d8888b8d4",
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/4669484ccbc38fe7c4e0c50456778f2010566aad",
"reference": "4669484ccbc38fe7c4e0c50456778f2010566aad",
"shasum": ""
},
"require": {
"php": "^5.4 || ^7.0 || ^8.0",
"phpoption/phpoption": "^1.5",
"symfony/polyfill-ctype": "^1.9"
"phpoption/phpoption": "^1.5.2",
"symfony/polyfill-ctype": "^1.16"
},
"require-dev": {
"ext-filter": "*",
"ext-pcre": "*",
"phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0"
"phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0"
},
"suggest": {
"ext-filter": "Required to use the boolean validator.",
@ -8378,7 +8317,7 @@
"type": "tidelift"
}
],
"time": "2020-05-23T09:42:03+00:00"
"time": "2020-06-02T14:08:54+00:00"
},
{
"name": "webpatser/laravel-countries",
@ -8777,16 +8716,16 @@
},
{
"name": "darkaonline/l5-swagger",
"version": "6.0.3",
"version": "6.0.4",
"source": {
"type": "git",
"url": "https://github.com/DarkaOnLine/L5-Swagger.git",
"reference": "df9e72d705e7757a700ac58d41c62b10c6ddc48c"
"reference": "690a2db0db6091139504f454c42fcdfb7a46f405"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/DarkaOnLine/L5-Swagger/zipball/df9e72d705e7757a700ac58d41c62b10c6ddc48c",
"reference": "df9e72d705e7757a700ac58d41c62b10c6ddc48c",
"url": "https://api.github.com/repos/DarkaOnLine/L5-Swagger/zipball/690a2db0db6091139504f454c42fcdfb7a46f405",
"reference": "690a2db0db6091139504f454c42fcdfb7a46f405",
"shasum": ""
},
"require": {
@ -8837,7 +8776,13 @@
"laravel",
"swagger"
],
"time": "2019-11-08T17:08:43+00:00"
"funding": [
{
"url": "https://github.com/DarkaOnLine",
"type": "github"
}
],
"time": "2020-06-05T05:07:26+00:00"
},
{
"name": "doctrine/annotations",
@ -10743,16 +10688,16 @@
},
{
"name": "swagger-api/swagger-ui",
"version": "v3.25.5",
"version": "v3.26.0",
"source": {
"type": "git",
"url": "https://github.com/swagger-api/swagger-ui.git",
"reference": "28b7d7c54866f3581f0f703f3971422a09ebd649"
"reference": "b9064157e710d0c56d4459b5a7c16751ad0ae72c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/28b7d7c54866f3581f0f703f3971422a09ebd649",
"reference": "28b7d7c54866f3581f0f703f3971422a09ebd649",
"url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/b9064157e710d0c56d4459b5a7c16751ad0ae72c",
"reference": "b9064157e710d0c56d4459b5a7c16751ad0ae72c",
"shasum": ""
},
"type": "library",
@ -10796,7 +10741,7 @@
"swagger",
"ui"
],
"time": "2020-05-28T17:37:47+00:00"
"time": "2020-06-05T00:57:11+00:00"
},
{
"name": "symfony/yaml",
@ -10961,16 +10906,16 @@
},
{
"name": "wildbit/postmark-php",
"version": "2.10.0",
"version": "2.11.0",
"source": {
"type": "git",
"url": "https://github.com/wildbit/postmark-php.git",
"reference": "3e2ed1deaebb5e6284ccfd143d852d7dec3cba0e"
"reference": "dd738b4de6d7dc3d296a1a7bad8f0b26f9693410"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/wildbit/postmark-php/zipball/3e2ed1deaebb5e6284ccfd143d852d7dec3cba0e",
"reference": "3e2ed1deaebb5e6284ccfd143d852d7dec3cba0e",
"url": "https://api.github.com/repos/wildbit/postmark-php/zipball/dd738b4de6d7dc3d296a1a7bad8f0b26f9693410",
"reference": "dd738b4de6d7dc3d296a1a7bad8f0b26f9693410",
"shasum": ""
},
"require": {
@ -10991,7 +10936,7 @@
"MIT"
],
"description": "The officially supported client for Postmark (http://postmarkapp.com)",
"time": "2020-04-09T10:02:15+00:00"
"time": "2020-06-08T08:42:08+00:00"
},
{
"name": "zircote/swagger-php",
@ -11061,7 +11006,6 @@
"minimum-stability": "dev",
"stability-flags": {
"beganovich/omnipay-checkout": 20,
"omnipay/authorizenet": 20,
"webpatser/laravel-countries": 20
},
"prefer-stable": true,

View File

@ -36,7 +36,7 @@ return [
'system_logging' => [
'Turbo124\Beacon\Jobs\System\CpuMetric',
'Turbo124\Beacon\Jobs\System\HdMetric',
'Turbo124\Beacon\Jobs\System\MemMetric',
'Turbo124\Beacon\Jobs\System\MemMetric'
],
];

View File

@ -67,6 +67,7 @@ return [
'password' => 'password',
'stripe' => env('STRIPE_KEYS', ''),
'paypal' => env('PAYPAL_KEYS', ''),
'authorize' => env('AUTHORIZE_KEYS',''),
'checkout' => env('CHECKOUT_KEYS',''),
'travis' => env('TRAVIS', false),
'test_email' => env('TEST_EMAIL', 'test@example.com'),

View File

@ -11,7 +11,7 @@ class PaymentLibrariesSeeder extends Seeder
Eloquent::unguard();
$gateways = [
['id' => 1, 'name' => 'Authorize.Net AIM', 'provider' => 'AuthorizeNet_AIM', 'sort_order' => 5, 'key' => '3b6621f970ab18887c4f6dca78d3f8bb', 'fields' => '{"apiLoginId":"","transactionKey":"","testMode":false,"developerMode":false,"liveEndpoint":"https:\/\/api2.authorize.net\/xml\/v1\/request.api","developerEndpoint":"https:\/\/apitest.authorize.net\/xml\/v1\/request.api"}
['id' => 1, 'name' => 'Authorize.Net', 'provider' => 'Authorize', 'sort_order' => 5, 'key' => '3b6621f970ab18887c4f6dca78d3f8bb', 'fields' => '{"apiLoginId":"","transactionKey":"","testMode":false,"developerMode":false,"liveEndpoint":"https:\/\/api2.authorize.net\/xml\/v1\/request.api","developerEndpoint":"https:\/\/apitest.authorize.net\/xml\/v1\/request.api"}
'],
['id' => 2, 'name' => 'CardSave', 'provider' => 'CardSave', 'key' => '46c5c1fed2c43acf4f379bae9c8b9f76', 'fields' => '{"merchantId":"","password":""}
'],

View File

@ -265,54 +265,68 @@ class RandomDataSeeder extends Seeder
]);
if (config('ninja.testvars.stripe')) {
$cg = new CompanyGateway;
$cg->company_id = $company->id;
$cg->user_id = $user->id;
$cg->gateway_key = 'd14dd26a37cecc30fdd65700bfb55b23';
$cg->require_cvv = true;
$cg->show_billing_address = true;
$cg->show_shipping_address = true;
$cg->update_details = true;
$cg->config = encrypt(config('ninja.testvars.stripe'));
$cg->save();
// if (config('ninja.testvars.stripe')) {
// $cg = new CompanyGateway;
// $cg->company_id = $company->id;
// $cg->user_id = $user->id;
// $cg->gateway_key = 'd14dd26a37cecc30fdd65700bfb55b23';
// $cg->require_cvv = true;
// $cg->show_billing_address = true;
// $cg->show_shipping_address = true;
// $cg->update_details = true;
// $cg->config = encrypt(config('ninja.testvars.stripe'));
// $cg->save();
// $cg = new CompanyGateway;
// $cg->company_id = $company->id;
// $cg->user_id = $user->id;
// $cg->gateway_key = 'd14dd26a37cecc30fdd65700bfb55b23';
// $cg->require_cvv = true;
// $cg->show_billing_address = true;
// $cg->show_shipping_address = true;
// $cg->update_details = true;
// $cg->config = encrypt(config('ninja.testvars.stripe'));
// $cg->save();
// }
// if (config('ninja.testvars.paypal')) {
// $cg = new CompanyGateway;
// $cg->company_id = $company->id;
// $cg->user_id = $user->id;
// $cg->gateway_key = '38f2c48af60c7dd69e04248cbb24c36e';
// $cg->require_cvv = true;
// $cg->show_billing_address = true;
// $cg->show_shipping_address = true;
// $cg->update_details = true;
// $cg->config = encrypt(config('ninja.testvars.paypal'));
// $cg->save();
// }
// if(config('ninja.testvars.checkout')) {
// $cg = new CompanyGateway;
// $cg->company_id = $company->id;
// $cg->user_id = $user->id;
// $cg->gateway_key = '3758e7f7c6f4cecf0f4f348b9a00f456';
// $cg->require_cvv = true;
// $cg->show_billing_address = true;
// $cg->show_shipping_address = true;
// $cg->update_details = true;
// $cg->config = encrypt(config('ninja.testvars.checkout'));
// $cg->save();
// }
if(config('ninja.testvars.authorize')) {
$cg = new CompanyGateway;
$cg->company_id = $company->id;
$cg->user_id = $user->id;
$cg->gateway_key = 'd14dd26a37cecc30fdd65700bfb55b23';
$cg->gateway_key = '3b6621f970ab18887c4f6dca78d3f8bb';
$cg->require_cvv = true;
$cg->show_billing_address = true;
$cg->show_shipping_address = true;
$cg->update_details = true;
$cg->config = encrypt(config('ninja.testvars.stripe'));
$cg->save();
}
if (config('ninja.testvars.paypal')) {
$cg = new CompanyGateway;
$cg->company_id = $company->id;
$cg->user_id = $user->id;
$cg->gateway_key = '38f2c48af60c7dd69e04248cbb24c36e';
$cg->require_cvv = true;
$cg->show_billing_address = true;
$cg->show_shipping_address = true;
$cg->update_details = true;
$cg->config = encrypt(config('ninja.testvars.paypal'));
$cg->save();
}
if(config('ninja.testvars.checkout')) {
$cg = new CompanyGateway;
$cg->company_id = $company->id;
$cg->user_id = $user->id;
$cg->gateway_key = '3758e7f7c6f4cecf0f4f348b9a00f456';
$cg->require_cvv = true;
$cg->show_billing_address = true;
$cg->show_shipping_address = true;
$cg->update_details = true;
$cg->config = encrypt(config('ninja.testvars.checkout'));
$cg->config = encrypt(config('ninja.testvars.authorize'));
$cg->save();
}
}
}

2
public/css/app.css vendored

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,3 @@
/*! For license information please see action-selectors.js.LICENSE.txt */
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=4)}({4:function(e,t,n){e.exports=n("Boob")},Boob:function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.parentElement=document.querySelector(".form-check-parent"),this.parentForm=document.getElementById("bulkActions")}var t,r,o;return t=e,(r=[{key:"watchCheckboxes",value:function(e){var t=this;document.querySelectorAll(".form-check-child").forEach((function(n){e.checked?(n.checked=e.checked,t.processChildItem(n,document.getElementById("bulkActions"))):(n.checked=!1,document.querySelectorAll(".child-hidden-input").forEach((function(e){return e.remove()})))}))}},{key:"processChildItem",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.hasOwnProperty("single")&&document.querySelectorAll(".child-hidden-input").forEach((function(e){return e.remove()}));var r=document.createElement("INPUT");r.setAttribute("name","invoices[]"),r.setAttribute("value",e.dataset.value),r.setAttribute("class","child-hidden-input"),r.hidden=!0,t.append(r)}},{key:"handle",value:function(){var e=this;this.parentElement.addEventListener("click",(function(){e.watchCheckboxes(e.parentElement)}));var t=!0,n=!1,r=void 0;try{for(var o,c=function(){var t=o.value;t.addEventListener("click",(function(){e.processChildItem(t,e.parentForm)}))},u=document.querySelectorAll(".form-check-child")[Symbol.iterator]();!(t=(o=u.next()).done);t=!0)c()}catch(e){n=!0,r=e}finally{try{t||null==u.return||u.return()}finally{if(n)throw r}}}}])&&n(t.prototype,r),o&&n(t,o),e}())).handle()}});
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=3)}({3:function(e,t,n){e.exports=n("Boob")},Boob:function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.parentElement=document.querySelector(".form-check-parent"),this.parentForm=document.getElementById("bulkActions")}var t,r,o;return t=e,(r=[{key:"watchCheckboxes",value:function(e){var t=this;document.querySelectorAll(".form-check-child").forEach((function(n){e.checked?(n.checked=e.checked,t.processChildItem(n,document.getElementById("bulkActions"))):(n.checked=!1,document.querySelectorAll(".child-hidden-input").forEach((function(e){return e.remove()})))}))}},{key:"processChildItem",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.hasOwnProperty("single")&&document.querySelectorAll(".child-hidden-input").forEach((function(e){return e.remove()}));var r=document.createElement("INPUT");r.setAttribute("name","invoices[]"),r.setAttribute("value",e.dataset.value),r.setAttribute("class","child-hidden-input"),r.hidden=!0,t.append(r)}},{key:"handle",value:function(){var e=this;this.parentElement.addEventListener("click",(function(){e.watchCheckboxes(e.parentElement)}));var t=!0,n=!1,r=void 0;try{for(var o,c=function(){var t=o.value;t.addEventListener("click",(function(){e.processChildItem(t,e.parentForm)}))},u=document.querySelectorAll(".form-check-child")[Symbol.iterator]();!(t=(o=u.next()).done);t=!0)c()}catch(e){n=!0,r=e}finally{try{t||null==u.return||u.return()}finally{if(n)throw r}}}}])&&n(t.prototype,r),o&&n(t,o),e}())).handle()}});

View File

@ -1,2 +1,4 @@
/*! For license information please see payment.js.LICENSE.txt */
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=5)}({5:function(e,t,n){e.exports=n("FuOr")},FuOr:function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var r=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.shouldDisplayTerms=t,this.shouldDisplaySignature=n,this.termsAccepted=!1}var t,r,i;return t=e,(r=[{key:"handleMethodSelect",value:function(e){var t=this;document.getElementById("company_gateway_id").value=e.dataset.companyGatewayId,document.getElementById("payment_method_id").value=e.dataset.gatewayTypeId,this.shouldDisplaySignature&&!this.shouldDisplayTerms&&(this.displayTerms(),document.getElementById("accept-terms-button").addEventListener("click",(function(){t.termsAccepted=!0,t.submitForm()}))),!this.shouldDisplaySignature&&this.shouldDisplayTerms&&(this.displaySignature(),document.getElementById("signature-next-step").addEventListener("click",(function(){document.querySelector('input[name="signature"').value=t.signaturePad.toDataURL(),t.submitForm()}))),this.shouldDisplaySignature&&this.shouldDisplayTerms&&(this.displaySignature(),document.getElementById("signature-next-step").addEventListener("click",(function(){t.displayTerms(),document.getElementById("accept-terms-button").addEventListener("click",(function(){document.querySelector('input[name="signature"').value=t.signaturePad.toDataURL(),t.termsAccepted=!0,t.submitForm()}))}))),this.shouldDisplaySignature||this.shouldDisplayTerms||this.submitForm()}},{key:"submitForm",value:function(){document.getElementById("payment-form").submit()}},{key:"displayTerms",value:function(){document.getElementById("displayTermsModal").removeAttribute("style")}},{key:"displaySignature",value:function(){document.getElementById("displaySignatureModal").removeAttribute("style");var e=new SignaturePad(document.getElementById("signature-pad"),{penColor:"rgb(0, 0, 0)"});this.signaturePad=e}},{key:"handle",value:function(){var e=this;document.querySelectorAll(".dropdown-gateway-button").forEach((function(t){t.addEventListener("click",(function(){return e.handleMethodSelect(t)}))}))}}])&&n(t.prototype,r),i&&n(t,i),e}(),i=document.querySelector('meta[name="require-invoice-signature"]').content,u=document.querySelector('meta[name="show-invoice-terms"]').content;new r(Boolean(+i),Boolean(+u)).handle()}});
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=4)}({4:function(e,t,n){e.exports=n("FuOr")},FuOr:function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var r=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.shouldDisplayTerms=t,this.shouldDisplaySignature=n,this.termsAccepted=!1}var t,r,i;return t=e,(r=[{key:"handleMethodSelect",value:function(e){var t=this;document.getElementById("company_gateway_id").value=e.dataset.companyGatewayId,document.getElementById("payment_method_id").value=e.dataset.gatewayTypeId,this.shouldDisplaySignature&&!this.shouldDisplayTerms&&(this.displayTerms(),document.getElementById("accept-terms-button").addEventListener("click",(function(){t.termsAccepted=!0,t.submitForm()}))),!this.shouldDisplaySignature&&this.shouldDisplayTerms&&(this.displaySignature(),document.getElementById("signature-next-step").addEventListener("click",(function(){document.querySelector('input[name="signature"').value=t.signaturePad.toDataURL(),t.submitForm()}))),this.shouldDisplaySignature&&this.shouldDisplayTerms&&(this.displaySignature(),document.getElementById("signature-next-step").addEventListener("click",(function(){t.displayTerms(),document.getElementById("accept-terms-button").addEventListener("click",(function(){document.querySelector('input[name="signature"').value=t.signaturePad.toDataURL(),t.termsAccepted=!0,t.submitForm()}))}))),this.shouldDisplaySignature||this.shouldDisplayTerms||this.submitForm()}},{key:"submitForm",value:function(){document.getElementById("payment-form").submit()}},{key:"displayTerms",value:function(){document.getElementById("displayTermsModal").removeAttribute("style")}},{key:"displaySignature",value:function(){document.getElementById("displaySignatureModal").removeAttribute("style");var e=new SignaturePad(document.getElementById("signature-pad"),{penColor:"rgb(0, 0, 0)"});this.signaturePad=e}},{key:"handle",value:function(){var e=this;document.querySelectorAll(".dropdown-gateway-button").forEach((function(t){t.addEventListener("click",(function(){return e.handleMethodSelect(t)}))}))}}])&&n(t.prototype,r),i&&n(t,i),e}(),i=document.querySelector('meta[name="require-invoice-signature"]').content,u=document.querySelector('meta[name="show-invoice-terms"]').content;new r(Boolean(+i),Boolean(+u)).handle()}});

View File

@ -1,2 +1,2 @@
/*! For license information please see authorize-authorize-card.js.LICENSE.txt */
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=2)}({2:function(e,t,n){e.exports=n("6vDv")},"6vDv":function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}new(function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.key=t,this.cardHolderName=document.getElementById("cardholder_name"),this.cardButton=document.getElementById("card_button")}var t,r,a;return t=e,(r=[{key:"handleAuthorization",value:function(){var e={};e.clientKey=this.key,e.apiLoginID="YOUR API LOGIN ID";var t={};t.cardNumber=document.getElementById("card_number").value,t.month=document.getElementById("expiration_month").value,t.year=document.getElementById("expiration_year").value,t.cardCode=document.getElementById("cvv").value;var n={};n.authData=e,n.cardData=t,Accept.dispatchData(n,responseHandler)}},{key:"responseHandler",value:function(e){if("Error"===e.messages.resultCode)for(var t=0;t<e.messages.message.length;)console.log(e.messages.message[t].code+": "+e.messages.message[t].text),t+=1;else paymentFormUpdate(e.opaqueData)}},{key:"paymentFormUpdate",value:function(e){document.getElementById("dataDescriptor").value=e.dataDescriptor,document.getElementById("dataValue").value=e.dataValue,document.getElementById("server_response").submit()}},{key:"handle",value:function(){var e=this;return this.cardButton.addEventListener("click",(function(){e.handleAuthorization()})),this}}])&&n(t.prototype,r),a&&n(t,a),e}())(document.querySelector('meta[name="authorize-public-key"]').content).handle()}});
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=2)}({2:function(e,t,n){e.exports=n("6vDv")},"6vDv":function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}new(function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.publicKey=t,this.loginId=n,this.cardHolderName=document.getElementById("cardholder_name"),this.cardButton=document.getElementById("card_button")}var t,r,a;return t=e,(r=[{key:"handleAuthorization",value:function(){var e={};e.clientKey=this.publicKey,e.apiLoginID=this.loginId;var t={};t.cardNumber=document.getElementById("card_number").value,t.month=document.getElementById("expiration_month").value,t.year=document.getElementById("expiration_year").value,t.cardCode=document.getElementById("cvv").value;var n={};return n.authData=e,n.cardData=t,Accept.dispatchData(n,this.responseHandler),!1}},{key:"responseHandler",value:function(e){if("Error"===e.messages.resultCode)for(var t=0;t<e.messages.message.length;)console.log(e.messages.message[t].code+": "+e.messages.message[t].text),t+=1;else"Ok"===e.messages.resultCode&&(document.getElementById("dataDescriptor").value=e.opaqueData.dataDescriptor,document.getElementById("dataValue").value=e.opaqueData.dataValue,document.getElementById("server_response").submit());return!1}},{key:"handle",value:function(){var e=this;return this.cardButton.addEventListener("click",(function(){e.handleAuthorization()})),this}}])&&n(t.prototype,r),a&&n(t,a),e}())(document.querySelector('meta[name="authorize-public-key"]').content,document.querySelector('meta[name="authorize-login-id"]').content).handle()}});

View File

@ -1,2 +1,3 @@
/*! For license information please see process.js.LICENSE.txt */
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=10)}({10:function(e,t,n){e.exports=n("OXGg")},OXGg:function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}new(function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.key=t,this.usingToken=n}var t,r,o;return t=e,(r=[{key:"setupStripe",value:function(){return this.stripe=Stripe(this.key),this.elements=this.stripe.elements(),this}},{key:"createElement",value:function(){return this.cardElement=this.elements.create("card"),this}},{key:"mountCardElement",value:function(){return this.cardElement.mount("#card-element"),this}},{key:"completePaymentUsingToken",value:function(){var e=this,t=document.getElementById("pay-now-with-token");this.stripe.handleCardPayment(t.dataset.secret,{payment_method:t.dataset.token}).then((function(t){return t.error?e.handleFailure(t.error.message):e.handleSuccess(t)}))}},{key:"completePaymentWithoutToken",value:function(){var e=this,t=document.getElementById("pay-now"),n=document.getElementById("cardholder-name");this.stripe.handleCardPayment(t.dataset.secret,this.cardElement,{payment_method_data:{billing_details:{name:n.value}}}).then((function(t){return t.error?e.handleFailure(t.error.message):e.handleSuccess(t)}))}},{key:"handleSuccess",value:function(e){document.querySelector('input[name="gateway_response"]').value=JSON.stringify(e.paymentIntent);var t=document.querySelector('input[name="token-billing-checkbox"]');t&&(document.querySelector('input[name="store_card"]').value=t.checked),document.getElementById("server-response").submit()}},{key:"handleFailure",value:function(e){var t=document.getElementById("errors");t.textContent="",t.textContent=e,t.hidden=!1}},{key:"handle",value:function(){var e=this;this.setupStripe(),this.usingToken&&document.getElementById("pay-now-with-token").addEventListener("click",(function(){return e.completePaymentUsingToken()})),this.usingToken||(this.createElement().mountCardElement(),document.getElementById("pay-now").addEventListener("click",(function(){return e.completePaymentWithoutToken()})))}}])&&n(t.prototype,r),o&&n(t,o),e}())(document.querySelector('meta[name="stripe-publishable-key"]').content,document.querySelector('meta[name="using-token"]').content).handle()}});
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=7)}({7:function(e,t,n){e.exports=n("OXGg")},OXGg:function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}new(function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.key=t,this.usingToken=n}var t,r,o;return t=e,(r=[{key:"setupStripe",value:function(){return this.stripe=Stripe(this.key),this.elements=this.stripe.elements(),this}},{key:"createElement",value:function(){return this.cardElement=this.elements.create("card"),this}},{key:"mountCardElement",value:function(){return this.cardElement.mount("#card-element"),this}},{key:"completePaymentUsingToken",value:function(){var e=this,t=document.getElementById("pay-now-with-token");this.stripe.handleCardPayment(t.dataset.secret,{payment_method:t.dataset.token}).then((function(t){return t.error?e.handleFailure(t.error.message):e.handleSuccess(t)}))}},{key:"completePaymentWithoutToken",value:function(){var e=this,t=document.getElementById("pay-now"),n=document.getElementById("cardholder-name");this.stripe.handleCardPayment(t.dataset.secret,this.cardElement,{payment_method_data:{billing_details:{name:n.value}}}).then((function(t){return t.error?e.handleFailure(t.error.message):e.handleSuccess(t)}))}},{key:"handleSuccess",value:function(e){document.querySelector('input[name="gateway_response"]').value=JSON.stringify(e.paymentIntent);var t=document.querySelector('input[name="token-billing-checkbox"]');t&&(document.querySelector('input[name="store_card"]').value=t.checked),document.getElementById("server-response").submit()}},{key:"handleFailure",value:function(e){var t=document.getElementById("errors");t.textContent="",t.textContent=e,t.hidden=!1}},{key:"handle",value:function(){var e=this;this.setupStripe(),this.usingToken&&document.getElementById("pay-now-with-token").addEventListener("click",(function(){return e.completePaymentUsingToken()})),this.usingToken||(this.createElement().mountCardElement(),document.getElementById("pay-now").addEventListener("click",(function(){return e.completePaymentWithoutToken()})))}}])&&n(t.prototype,r),o&&n(t,o),e}())(document.querySelector('meta[name="stripe-publishable-key"]').content,document.querySelector('meta[name="using-token"]').content).handle()}});

View File

@ -1,2 +1,3 @@
/*! For license information please see action-selectors.js.LICENSE.txt */
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=8)}({8:function(e,t,n){e.exports=n("ydWM")},ydWM:function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.parentElement=document.querySelector(".form-check-parent"),this.parentForm=document.getElementById("bulkActions")}var t,r,o;return t=e,(r=[{key:"watchCheckboxes",value:function(e){var t=this;document.querySelectorAll(".form-check-child").forEach((function(n){e.checked?(n.checked=e.checked,t.processChildItem(n,document.getElementById("bulkActions"))):(n.checked=!1,document.querySelectorAll(".child-hidden-input").forEach((function(e){return e.remove()})))}))}},{key:"processChildItem",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.hasOwnProperty("single")&&document.querySelectorAll(".child-hidden-input").forEach((function(e){return e.remove()}));var r=document.createElement("INPUT");r.setAttribute("name","quotes[]"),r.setAttribute("value",e.dataset.value),r.setAttribute("class","child-hidden-input"),r.hidden=!0,t.append(r)}},{key:"handle",value:function(){var e=this;this.parentElement.addEventListener("click",(function(){e.watchCheckboxes(e.parentElement)}));var t=!0,n=!1,r=void 0;try{for(var o,c=function(){var t=o.value;t.addEventListener("click",(function(){e.processChildItem(t,e.parentForm)}))},u=document.querySelectorAll(".form-check-child")[Symbol.iterator]();!(t=(o=u.next()).done);t=!0)c()}catch(e){n=!0,r=e}finally{try{t||null==u.return||u.return()}finally{if(n)throw r}}}}])&&n(t.prototype,r),o&&n(t,o),e}())).handle()}});
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=5)}({5:function(e,t,n){e.exports=n("ydWM")},ydWM:function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.parentElement=document.querySelector(".form-check-parent"),this.parentForm=document.getElementById("bulkActions")}var t,r,o;return t=e,(r=[{key:"watchCheckboxes",value:function(e){var t=this;document.querySelectorAll(".form-check-child").forEach((function(n){e.checked?(n.checked=e.checked,t.processChildItem(n,document.getElementById("bulkActions"))):(n.checked=!1,document.querySelectorAll(".child-hidden-input").forEach((function(e){return e.remove()})))}))}},{key:"processChildItem",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.hasOwnProperty("single")&&document.querySelectorAll(".child-hidden-input").forEach((function(e){return e.remove()}));var r=document.createElement("INPUT");r.setAttribute("name","quotes[]"),r.setAttribute("value",e.dataset.value),r.setAttribute("class","child-hidden-input"),r.hidden=!0,t.append(r)}},{key:"handle",value:function(){var e=this;this.parentElement.addEventListener("click",(function(){e.watchCheckboxes(e.parentElement)}));var t=!0,n=!1,r=void 0;try{for(var o,c=function(){var t=o.value;t.addEventListener("click",(function(){e.processChildItem(t,e.parentForm)}))},u=document.querySelectorAll(".form-check-child")[Symbol.iterator]();!(t=(o=u.next()).done);t=!0)c()}catch(e){n=!0,r=e}finally{try{t||null==u.return||u.return()}finally{if(n)throw r}}}}])&&n(t.prototype,r),o&&n(t,o),e}())).handle()}});

View File

@ -1,2 +1,3 @@
/*! For license information please see approve.js.LICENSE.txt */
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=9)}({9:function(e,t,n){e.exports=n("WuMn")},WuMn:function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var r=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.shouldDisplaySignature=t}var t,r,o;return t=e,(r=[{key:"submitForm",value:function(){document.getElementById("approve-form").submit()}},{key:"displaySignature",value:function(){document.getElementById("displaySignatureModal").removeAttribute("style"),new SignaturePad(document.getElementById("signature-pad"),{backgroundColor:"rgb(240,240,240)",penColor:"rgb(0, 0, 0)"})}},{key:"handle",value:function(){var e=this;document.getElementById("approve-button").addEventListener("click",(function(){e.shouldDisplaySignature&&(e.displaySignature(),document.getElementById("signature-next-step").addEventListener("click",(function(){e.submitForm()}))),e.shouldDisplaySignature||e.submitForm()}))}}])&&n(t.prototype,r),o&&n(t,o),e}(),o=document.querySelector('meta[name="require-quote-signature"]').content;new r(Boolean(+o)).handle()}});
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=6)}({6:function(e,t,n){e.exports=n("WuMn")},WuMn:function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var r=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.shouldDisplaySignature=t}var t,r,o;return t=e,(r=[{key:"submitForm",value:function(){document.getElementById("approve-form").submit()}},{key:"displaySignature",value:function(){document.getElementById("displaySignatureModal").removeAttribute("style"),new SignaturePad(document.getElementById("signature-pad"),{backgroundColor:"rgb(240,240,240)",penColor:"rgb(0, 0, 0)"})}},{key:"handle",value:function(){var e=this;document.getElementById("approve-button").addEventListener("click",(function(){e.shouldDisplaySignature&&(e.displaySignature(),document.getElementById("signature-next-step").addEventListener("click",(function(){e.submitForm()}))),e.shouldDisplaySignature||e.submitForm()}))}}])&&n(t.prototype,r),o&&n(t,o),e}(),o=document.querySelector('meta[name="require-quote-signature"]').content;new r(Boolean(+o)).handle()}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,16 +1,14 @@
{
"/js/app.js": "/js/app.js?id=8b49701583f407403ddf",
"/css/app.css": "/css/app.css?id=05d9dbe4a834b13c2fde",
"/js/clients/invoices/action-selectors.js": "/js/clients/invoices/action-selectors.js?id=d16c0e6728b00d329cbb",
"/js/clients/invoices/payment.js": "/js/clients/invoices/payment.js?id=8ce8955ba775ea5f47d1",
"/js/clients/payment_methods/authorize-ach.js": "/js/clients/payment_methods/authorize-ach.js?id=30a5db56b004becf4715",
"/js/clients/payment_methods/authorize-authorize-card.js": "/js/clients/payment_methods/authorize-authorize-card.js?id=a48d471c20f615831703",
"/css/app.css": "/css/app.css?id=9082c02ea8f150e2a3e9",
"/js/clients/invoices/action-selectors.js": "/js/clients/invoices/action-selectors.js?id=725ed8b1ad1518cdffe9",
"/js/clients/invoices/payment.js": "/js/clients/invoices/payment.js?id=af22ef81288656e46b7f",
"/js/clients/payment_methods/authorize-authorize-card.js": "/js/clients/payment_methods/authorize-authorize-card.js?id=b0a1bd21a57e12cd491a",
"/js/clients/payment_methods/authorize-stripe-card.js": "/js/clients/payment_methods/authorize-stripe-card.js?id=f4c45f0da9868d840799",
"/js/clients/payments/alipay.js": "/js/clients/payments/alipay.js?id=04778cbf46488e8f6b5f",
"/js/clients/payments/process.js": "/js/clients/payments/process.js?id=0bdd1a7589d74f11c66f",
"/js/clients/payments/sofort.js": "/js/clients/payments/sofort.js?id=f9253aea74535bc46886",
"/js/clients/quotes/action-selectors.js": "/js/clients/quotes/action-selectors.js?id=222bdd54bf9ed1d9b837",
"/js/clients/quotes/approve.js": "/js/clients/quotes/approve.js?id=5cf5a06486e8a108adb1",
"/js/clients/shared/pdf.js": "/js/clients/shared/pdf.js?id=514f558f39158d50f4c7",
"/js/setup/setup.js": "/js/setup/setup.js?id=4e25e6ead22865dabbf6"
"/js/clients/payments/process.js": "/js/clients/payments/process.js?id=a97ddadb7af0563c1d4b",
"/js/clients/quotes/action-selectors.js": "/js/clients/quotes/action-selectors.js?id=3af82eeaf86fe5efaa2c",
"/js/clients/quotes/approve.js": "/js/clients/quotes/approve.js?id=972c7cc8e9d9406babfa",
"/js/clients/shared/pdf.js": "/js/clients/shared/pdf.js?id=afc25cff1d17c538d66d",
"/js/setup/setup.js": "/js/setup/setup.js?id=39f1625d7fbbda12d0e3"
}

View File

@ -9,8 +9,10 @@
*/
class AuthorizeAuthorizeCard {
constructor(key) {
this.key = key;
constructor(publicKey, loginId) {
this.publicKey = publicKey;
this.loginId = loginId;
this.cardHolderName = document.getElementById("cardholder_name");
this.cardButton = document.getElementById("card_button");
@ -19,8 +21,8 @@ class AuthorizeAuthorizeCard {
handleAuthorization() {
var authData = {};
authData.clientKey = this.key;
authData.apiLoginID = "YOUR API LOGIN ID";
authData.clientKey = this.publicKey;
authData.apiLoginID = this.loginId;
var cardData = {};
cardData.cardNumber = document.getElementById("card_number").value;
@ -36,7 +38,9 @@ class AuthorizeAuthorizeCard {
//
// secureData.bankData = bankData;
Accept.dispatchData(secureData, responseHandler);
Accept.dispatchData(secureData, this.responseHandler);
return false;
}
responseHandler(response) {
@ -51,17 +55,17 @@ class AuthorizeAuthorizeCard {
i = i + 1;
}
}
else {
paymentFormUpdate(response.opaqueData);
else if(response.messages.resultCode === "Ok"){
document.getElementById("dataDescriptor").value = response.opaqueData.dataDescriptor;
document.getElementById("dataValue").value = response.opaqueData.dataValue;
document.getElementById("server_response").submit();
}
return false;
}
paymentFormUpdate(opaqueData) {
document.getElementById("dataDescriptor").value = opaqueData.dataDescriptor;
document.getElementById("dataValue").value = opaqueData.dataValue;
document.getElementById("server_response").submit();
}
handle() {
@ -77,5 +81,9 @@ const publicKey = document.querySelector(
'meta[name="authorize-public-key"]'
).content;
const loginId = document.querySelector(
'meta[name="authorize-login-id"]'
).content;
/** @handle */
new AuthorizeAuthorizeCard(publicKey).handle();
new AuthorizeAuthorizeCard(publicKey, loginId).handle();

View File

@ -2,7 +2,8 @@
@section('meta_title', ctrans('texts.add_credit_card'))
@push('head')
<meta name="authorize-public-key" content="{{ $gateway->getPublishableKey() }}">
<meta name="authorize-public-key" content="{{ $public_client_id }}">
<meta name="authorize-login-id" content="{{ $api_login_id }}">
@endpush
@section('body')
@ -92,7 +93,7 @@
@push('footer')
@if($this->gateway->getConfigField('testMode'))
@if($gateway->getConfigField('testMode'))
<script src="https://jstest.authorize.net/v1/Accept.js" charset="utf-8"></script>
@else
<script src="https://js.authorize.net/v1/Accept.js" charset="utf-8"></script>

View File

@ -0,0 +1,377 @@
<?php
namespace Tests\Integration\PaymentDrivers;
use Tests\TestCase;
use net\authorize\api\constants\ANetEnvironment;
use net\authorize\api\contract\v1 as AnetAPI;
use net\authorize\api\contract\v1\CreateCustomerPaymentProfileRequest;
use net\authorize\api\contract\v1\CreateTransactionRequest;
use net\authorize\api\contract\v1\CreditCardType;
use net\authorize\api\contract\v1\CustomerAddressType;
use net\authorize\api\contract\v1\CustomerPaymentProfileType;
use net\authorize\api\contract\v1\CustomerProfilePaymentType;
use net\authorize\api\contract\v1\CustomerProfileType;
use net\authorize\api\contract\v1\GetCustomerProfileIdsRequest;
use net\authorize\api\contract\v1\GetCustomerProfileRequest;
use net\authorize\api\contract\v1\GetMerchantDetailsRequest;
use net\authorize\api\contract\v1\MerchantAuthenticationType;
use net\authorize\api\contract\v1\PaymentProfileType;
use net\authorize\api\contract\v1\PaymentType;
use net\authorize\api\contract\v1\TransactionRequestType;
use net\authorize\api\controller\CreateCustomerPaymentProfileController;
use net\authorize\api\controller\CreateCustomerProfileController;
use net\authorize\api\controller\CreateTransactionController;
use net\authorize\api\controller\GetCustomerProfileController;
use net\authorize\api\controller\GetCustomerProfileIdsController;
use net\authorize\api\controller\GetMerchantDetailsController;
/**
* @test
*/
class AuthorizeTest extends TestCase
{
public $customer_profile_id = 1512191314;
public $customer_payment_profile = 1512219932;
public function setUp() :void
{
parent::setUp();
if (! config('ninja.testvars.authorize')) {
$this->markTestSkipped('authorize.net not configured');
}
}
public function testUnpackingVars()
{
$vars = json_decode(config('ninja.testvars.authorize'));
$this->assertTrue(property_exists($vars, 'apiLoginId'));
}
public function testCreatePublicClientKey()
{
error_reporting (E_ALL & ~E_DEPRECATED);
$vars = json_decode(config('ninja.testvars.authorize'));
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
$merchantAuthentication->setName($vars->apiLoginId);
$merchantAuthentication->setTransactionKey($vars->transactionKey);
$request = new AnetAPI\GetMerchantDetailsRequest();
$request->setMerchantAuthentication($merchantAuthentication);
$controller = new GetMerchantDetailsController($request);
$response = $controller->executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::SANDBOX);
$this->assertNotNull($response->getPublicClientKey());
}
public function testProfileIdList()
{
error_reporting (E_ALL & ~E_DEPRECATED);
$vars = json_decode(config('ninja.testvars.authorize'));
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
$merchantAuthentication->setName($vars->apiLoginId);
$merchantAuthentication->setTransactionKey($vars->transactionKey);
// Set the transaction's refId
$refId = 'ref' . time();
// Get all existing customer profile ID's
$request = new GetCustomerProfileIdsRequest();
$request->setMerchantAuthentication($merchantAuthentication);
$controller = new GetCustomerProfileIdsController($request);
$response = $controller->executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::SANDBOX);
if (($response != null) && ($response->getMessages()->getResultCode() == "Ok") )
{
info("GetCustomerProfileId's SUCCESS: " . "\n");
info(print_r($response->getIds(),1));
}
else
{
info("GetCustomerProfileId's ERROR : Invalid response\n");
$errorMessages = $response->getMessages()->getMessage();
info("Response : " . $errorMessages[0]->getCode() . " " .$errorMessages[0]->getText() . "\n");
}
$this->assertNotNull($response);
}
public function testCreateProfile()
{
error_reporting (E_ALL & ~E_DEPRECATED);
$vars = json_decode(config('ninja.testvars.authorize'));
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
$merchantAuthentication->setName($vars->apiLoginId);
$merchantAuthentication->setTransactionKey($vars->transactionKey);
// Create the Bill To info for new payment type
$billTo = new CustomerAddressType();
$billTo->setFirstName("Ellen");
$billTo->setLastName("Johnson");
$billTo->setCompany("Souveniropolis");
$billTo->setAddress("14 Main Street");
$billTo->setCity("Pecan Springs");
$billTo->setState("TX");
$billTo->setZip("44628");
$billTo->setCountry("USA");
$billTo->setPhoneNumber("888-888-8888");
$billTo->setfaxNumber("999-999-9999");
// Create a customer shipping address
$customerShippingAddress = new CustomerAddressType();
$customerShippingAddress->setFirstName("James");
$customerShippingAddress->setLastName("White");
$customerShippingAddress->setCompany("Addresses R Us");
$customerShippingAddress->setAddress(rand() . " North Spring Street");
$customerShippingAddress->setCity("Toms River");
$customerShippingAddress->setState("NJ");
$customerShippingAddress->setZip("08753");
$customerShippingAddress->setCountry("USA");
$customerShippingAddress->setPhoneNumber("888-888-8888");
$customerShippingAddress->setFaxNumber("999-999-9999");
// Create an array of any shipping addresses
$shippingProfiles[] = $customerShippingAddress;
$refId = 'ref' . time();
$email = "test@gmail.com";
// // Create a new CustomerPaymentProfile object
// $paymentProfile = new AnetAPI\CustomerPaymentProfileType();
// $paymentProfile->setCustomerType('individual');
// $paymentProfile->setBillTo($billTo);
// $paymentProfile->setPayment($paymentCreditCard);
// $paymentProfiles[] = $paymentProfile;
// Create a new CustomerProfileType and add the payment profile object
$customerProfile = new CustomerProfileType();
$customerProfile->setDescription("Customer 2 Test PHP");
$customerProfile->setMerchantCustomerId("M_" . time());
$customerProfile->setEmail($email);
//$customerProfile->setpaymentProfiles($paymentProfiles);
$customerProfile->setShipToList($shippingProfiles);
// Assemble the complete transaction request
$request = new AnetAPI\CreateCustomerProfileRequest();
$request->setMerchantAuthentication($merchantAuthentication);
$request->setRefId($refId);
$request->setProfile($customerProfile);
// Create the controller and get the response
$controller = new CreateCustomerProfileController($request);
$response = $controller->executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::SANDBOX);
if (($response != null) && ($response->getMessages()->getResultCode() == "Ok")) {
info("Succesfully created customer profile : " . $response->getCustomerProfileId() . "\n");
$paymentProfiles = $response->getCustomerPaymentProfileIdList();
info(print_r($paymentProfiles,1));
} else {
info("ERROR : Invalid response\n");
$errorMessages = $response->getMessages()->getMessage();
info("Response : " . $errorMessages[0]->getCode() . " " .$errorMessages[0]->getText() . "\n");
}
$this->assertNotNull($response);
}
public function testGetCustomerProfileId()
{
error_reporting (E_ALL & ~E_DEPRECATED);
$vars = json_decode(config('ninja.testvars.authorize'));
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
$merchantAuthentication->setName($vars->apiLoginId);
$merchantAuthentication->setTransactionKey($vars->transactionKey);
$request = new GetCustomerProfileRequest();
$request->setMerchantAuthentication($merchantAuthentication);
$request->setCustomerProfileId($this->customer_profile_id);
$controller = new GetCustomerProfileController($request);
$response = $controller->executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::SANDBOX);
if (($response != null) && ($response->getMessages()->getResultCode() == "Ok")) {
info("got profile");
info(print_r($response->getProfile(),1));
} else {
info("ERROR : Invalid response\n");
}
$this->assertNotNull($response);
}
public function testCreateCustomerPaymentProfile()
{
info("test create customer payment profile");
error_reporting (E_ALL & ~E_DEPRECATED);
$vars = json_decode(config('ninja.testvars.authorize'));
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
$merchantAuthentication->setName($vars->apiLoginId);
$merchantAuthentication->setTransactionKey($vars->transactionKey);
// Set the transaction's refId
$refId = 'ref' . time();
// Set credit card information for payment profile
$creditCard = new CreditCardType();
$creditCard->setCardNumber("4007000000027");
$creditCard->setExpirationDate("2038-12");
$creditCard->setCardCode("142");
$paymentCreditCard = new PaymentType();
$paymentCreditCard->setCreditCard($creditCard);
// Create the Bill To info for new payment type
$billto = new CustomerAddressType();
$billto->setFirstName("Ellen");
$billto->setLastName("Johnson");
$billto->setCompany("Souveniropolis");
$billto->setAddress("14 Main Street");
$billto->setCity("Pecan Springs");
$billto->setState("TX");
$billto->setZip("44628");
$billto->setCountry("USA");
$billto->setPhoneNumber("999-999-9999");
$billto->setfaxNumber("999-999-9999");
// Create a new Customer Payment Profile object
$paymentprofile = new CustomerPaymentProfileType();
$paymentprofile->setCustomerType('individual');
$paymentprofile->setBillTo($billto);
$paymentprofile->setPayment($paymentCreditCard);
$paymentprofile->setDefaultPaymentProfile(true);
$paymentprofiles[] = $paymentprofile;
// Assemble the complete transaction request
$paymentprofilerequest = new CreateCustomerPaymentProfileRequest();
$paymentprofilerequest->setMerchantAuthentication($merchantAuthentication);
// Add an existing profile id to the request
$paymentprofilerequest->setCustomerProfileId($this->customer_profile_id);
$paymentprofilerequest->setPaymentProfile($paymentprofile);
$paymentprofilerequest->setValidationMode("liveMode");
// Create the controller and get the response
$controller = new CreateCustomerPaymentProfileController($paymentprofilerequest);
$response = $controller->executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::SANDBOX);
if (($response != null) && ($response->getMessages()->getResultCode() == "Ok") ) {
info("Create Customer Payment Profile SUCCESS: " . $response->getCustomerPaymentProfileId() . "\n");
} else {
info("Create Customer Payment Profile: ERROR Invalid response\n");
$errorMessages = $response->getMessages()->getMessage();
info("Response : " . $errorMessages[0]->getCode() . " " .$errorMessages[0]->getText() . "\n");
}
$this->assertNotNull($response);
}
function testChargeCustomerProfile()
{
error_reporting (E_ALL & ~E_DEPRECATED);
$vars = json_decode(config('ninja.testvars.authorize'));
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
$merchantAuthentication->setName($vars->apiLoginId);
$merchantAuthentication->setTransactionKey($vars->transactionKey);
// Set the transaction's refId
$refId = 'ref' . time();
$profileToCharge = new CustomerProfilePaymentType();
$profileToCharge->setCustomerProfileId($this->customer_profile_id);
$paymentProfile = new PaymentProfileType();
$paymentProfile->setPaymentProfileId($this->customer_payment_profile);
$profileToCharge->setPaymentProfile($paymentProfile);
$transactionRequestType = new TransactionRequestType();
$transactionRequestType->setTransactionType( "authCaptureTransaction");
$transactionRequestType->setAmount(400);
$transactionRequestType->setProfile($profileToCharge);
$request = new CreateTransactionRequest();
$request->setMerchantAuthentication($merchantAuthentication);
$request->setRefId( $refId);
$request->setTransactionRequest( $transactionRequestType);
$controller = new CreateTransactionController($request);
$response = $controller->executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::SANDBOX);
if ($response != null)
{
if($response->getMessages()->getResultCode() == "Ok")
{
$tresponse = $response->getTransactionResponse();
if ($tresponse != null && $tresponse->getMessages() != null)
{
info( " Transaction Response code : " . $tresponse->getResponseCode() . "\n");
info( "Charge Customer Profile APPROVED :" . "\n");
info( " Charge Customer Profile AUTH CODE : " . $tresponse->getAuthCode() . "\n");
info( " Charge Customer Profile TRANS ID : " . $tresponse->getTransId() . "\n");
info( " Code : " . $tresponse->getMessages()[0]->getCode() . "\n");
info( " Description : " . $tresponse->getMessages()[0]->getDescription() . "\n");
}
else
{
info( "Transaction Failed \n");
if($tresponse->getErrors() != null)
{
info( " Error code : " . $tresponse->getErrors()[0]->getErrorCode() . "\n");
info( " Error message : " . $tresponse->getErrors()[0]->getErrorText() . "\n");
}
}
}
else
{
info( "Transaction Failed \n");
$tresponse = $response->getTransactionResponse();
if($tresponse != null && $tresponse->getErrors() != null)
{
info( " Error code : " . $tresponse->getErrors()[0]->getErrorCode() . "\n");
info( " Error message : " . $tresponse->getErrors()[0]->getErrorText() . "\n");
}
else
{
info( " Error code : " . $response->getMessages()->getMessage()[0]->getCode() . "\n");
info( " Error message : " . $response->getMessages()->getMessage()[0]->getText() . "\n");
}
}
}
else
{
info( "No response returned \n");
}
$this->assertNotNull($response);
}
}