mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 06:32:40 +01:00
WePay
This commit is contained in:
parent
f2da4d7985
commit
4173cb6903
@ -160,6 +160,17 @@ class BaseDriver extends AbstractPaymentDriver
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Detaches a payment method from the gateway
|
||||||
|
*
|
||||||
|
* @param ClientGatewayToken $token The gateway token
|
||||||
|
* @return bool boolean response
|
||||||
|
*/
|
||||||
|
public function detach(ClientGatewayToken $token)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the inbound request payment method type for access.
|
* Set the inbound request payment method type for access.
|
||||||
*
|
*
|
||||||
|
@ -198,7 +198,7 @@ class ACH
|
|||||||
return redirect()->route('client.payment_methods.verification', ['payment_method' => $token->hashed_id, 'method' => GatewayType::BANK_TRANSFER]);
|
return redirect()->route('client.payment_methods.verification', ['payment_method' => $token->hashed_id, 'method' => GatewayType::BANK_TRANSFER]);
|
||||||
|
|
||||||
$response = $this->wepay_payment_driver->wepay->request('checkout/create', array(
|
$response = $this->wepay_payment_driver->wepay->request('checkout/create', array(
|
||||||
'callback_uri' => route('payment_webhook', ['company_key' => $this->wepay_payment_driver->company_gateway->company->company_key, 'company_gateway_id' => $this->wepay_payment_driver->company_gateway->hashed_id]),
|
// 'callback_uri' => route('payment_webhook', ['company_key' => $this->wepay_payment_driver->company_gateway->company->company_key, 'company_gateway_id' => $this->wepay_payment_driver->company_gateway->hashed_id]),
|
||||||
'unique_id' => Str::random(40),
|
'unique_id' => Str::random(40),
|
||||||
'account_id' => $this->wepay_payment_driver->company_gateway->getConfigField('accountId'),
|
'account_id' => $this->wepay_payment_driver->company_gateway->getConfigField('accountId'),
|
||||||
'amount' => $this->wepay_payment_driver->payment_hash->data->amount_with_fee,
|
'amount' => $this->wepay_payment_driver->payment_hash->data->amount_with_fee,
|
||||||
|
@ -117,7 +117,7 @@ use WePayCommon;
|
|||||||
nlog("authorize the card first!");
|
nlog("authorize the card first!");
|
||||||
|
|
||||||
$response = $this->wepay_payment_driver->wepay->request('credit_card/authorize', array(
|
$response = $this->wepay_payment_driver->wepay->request('credit_card/authorize', array(
|
||||||
'callback_uri' => route('payment_webhook', ['company_key' => $this->wepay_payment_driver->company_gateway->company->company_key, 'company_gateway_id' => $this->wepay_payment_driver->company_gateway->hashed_id]),
|
// 'callback_uri' => route('payment_webhook', ['company_key' => $this->wepay_payment_driver->company_gateway->company->company_key, 'company_gateway_id' => $this->wepay_payment_driver->company_gateway->hashed_id]),
|
||||||
'client_id' => config('ninja.wepay.client_id'),
|
'client_id' => config('ninja.wepay.client_id'),
|
||||||
'client_secret' => config('ninja.wepay.client_secret'),
|
'client_secret' => config('ninja.wepay.client_secret'),
|
||||||
'credit_card_id' => (int)$request->input('credit_card_id'),
|
'credit_card_id' => (int)$request->input('credit_card_id'),
|
||||||
@ -142,7 +142,7 @@ use WePayCommon;
|
|||||||
nlog($request->all());
|
nlog($request->all());
|
||||||
// charge the credit card
|
// charge the credit card
|
||||||
$response = $this->wepay_payment_driver->wepay->request('checkout/create', array(
|
$response = $this->wepay_payment_driver->wepay->request('checkout/create', array(
|
||||||
'callback_uri' => route('payment_webhook', ['company_key' => $this->wepay_payment_driver->company_gateway->company->company_key, 'company_gateway_id' => $this->wepay_payment_driver->company_gateway->hashed_id]),
|
// 'callback_uri' => route('payment_webhook', ['company_key' => $this->wepay_payment_driver->company_gateway->company->company_key, 'company_gateway_id' => $this->wepay_payment_driver->company_gateway->hashed_id]),
|
||||||
'unique_id' => Str::random(40),
|
'unique_id' => Str::random(40),
|
||||||
'account_id' => $this->wepay_payment_driver->company_gateway->getConfigField('accountId'),
|
'account_id' => $this->wepay_payment_driver->company_gateway->getConfigField('accountId'),
|
||||||
'amount' => $this->wepay_payment_driver->payment_hash->data->amount_with_fee,
|
'amount' => $this->wepay_payment_driver->payment_hash->data->amount_with_fee,
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if($country == 'CA')
|
@if($country == 'CA')
|
||||||
<div class="col-span-6 sm:col-span-4">
|
<div class="col-span-6 sm:col-span-4 {{ $country != 'CA' ? 'hidden' : 'block' }}">
|
||||||
<label for="country" class="input-label">@lang('texts.debit_cards')</label>
|
<label for="country" class="input-label">@lang('texts.debit_cards')</label>
|
||||||
|
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
@ -82,15 +82,16 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<!--
|
|
||||||
<div class="col-span-6 sm:col-span-4">
|
@if($country == 'US')
|
||||||
|
<div class="col-span-6 sm:col-span-4 {{ $country != 'US' ? 'hidden' : 'block' }}">
|
||||||
<label for="country" class="input-label">@lang('texts.ach')</label>
|
<label for="country" class="input-label">@lang('texts.ach')</label>
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<input class="form-checkbox cursor-pointer mr-2" type="checkbox" name="ach" value="1" wire:model="ach">
|
<input class="form-checkbox cursor-pointer mr-2" type="checkbox" name="ach" value="1" wire:model="ach">
|
||||||
<span>{{ ctrans('texts.enable_ach')}}</span>
|
<span>{{ ctrans('texts.enable_ach')}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
-->
|
@endif
|
||||||
|
|
||||||
<div class="col-span-6 sm:col-span-4">
|
<div class="col-span-6 sm:col-span-4">
|
||||||
<label for="country" class="input-label"></label>
|
<label for="country" class="input-label"></label>
|
||||||
@ -281,5 +282,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user