mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
wip
This commit is contained in:
parent
9c97421a55
commit
7d8c135ba7
@ -38,6 +38,18 @@ class CreditCard
|
|||||||
$this->braintree->init();
|
$this->braintree->init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function authorizeView(array $data)
|
||||||
|
{
|
||||||
|
$data['gateway'] = $this->braintree;
|
||||||
|
|
||||||
|
return render('gateways.braintree.credit_card.authorize', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function authorizeResponse($data)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Credit card payment page.
|
* Credit card payment page.
|
||||||
*
|
*
|
||||||
@ -52,6 +64,13 @@ class CreditCard
|
|||||||
return render('gateways.braintree.credit_card.pay', $data);
|
return render('gateways.braintree.credit_card.pay', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Process the credit card payments.
|
||||||
|
*
|
||||||
|
* @param PaymentResponseRequest $request
|
||||||
|
* @return \Illuminate\Http\RedirectResponse|void
|
||||||
|
* @throws PaymentFailed
|
||||||
|
*/
|
||||||
public function paymentResponse(PaymentResponseRequest $request)
|
public function paymentResponse(PaymentResponseRequest $request)
|
||||||
{
|
{
|
||||||
$state = [
|
$state = [
|
||||||
@ -94,8 +113,6 @@ class CreditCard
|
|||||||
'gateway_type_id' => GatewayType::CREDIT_CARD,
|
'gateway_type_id' => GatewayType::CREDIT_CARD,
|
||||||
];
|
];
|
||||||
|
|
||||||
// Store card if checkbox selected.
|
|
||||||
|
|
||||||
$payment = $this->braintree->createPayment($data, Payment::STATUS_COMPLETED);
|
$payment = $this->braintree->createPayment($data, Payment::STATUS_COMPLETED);
|
||||||
|
|
||||||
SystemLogger::dispatch(
|
SystemLogger::dispatch(
|
||||||
|
@ -66,6 +66,16 @@ class BraintreePaymentDriver extends BaseDriver
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function authorizeView($data)
|
||||||
|
{
|
||||||
|
return $this->payment_method->authorizeView($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function authorizeResponse($data)
|
||||||
|
{
|
||||||
|
return $this->payment_method->authorizeResponse($data);
|
||||||
|
}
|
||||||
|
|
||||||
public function processPaymentView(array $data)
|
public function processPaymentView(array $data)
|
||||||
{
|
{
|
||||||
return $this->payment_method->paymentView($data);
|
return $this->payment_method->paymentView($data);
|
||||||
|
@ -4235,6 +4235,8 @@ $LANG = array(
|
|||||||
'notification_quote_created_subject' => 'Quote :invoice was created for :client',
|
'notification_quote_created_subject' => 'Quote :invoice was created for :client',
|
||||||
'notification_credit_created_subject' => 'Credit :invoice was created to :client',
|
'notification_credit_created_subject' => 'Credit :invoice was created to :client',
|
||||||
'notification_credit_created_subject' => 'Credit :invoice was created for :client',
|
'notification_credit_created_subject' => 'Credit :invoice was created for :client',
|
||||||
|
|
||||||
|
'payment_method_cannot_be_authorized_first' => 'This payment method can be can saved for future use, once you complete your first transaction. Don\'t forget to check "Store credit card details" during payment process.',
|
||||||
);
|
);
|
||||||
|
|
||||||
return $LANG;
|
return $LANG;
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
@extends('portal.ninja2020.layout.payments', ['gateway_title' => 'Credit card', 'card_title' => 'Credit card'])
|
||||||
|
|
||||||
|
@section('gateway_content')
|
||||||
|
@component('portal.ninja2020.components.general.card-element-single', ['title' => 'Credit card', 'show_title' => false])
|
||||||
|
{{ __('texts.payment_method_cannot_be_authorized_first') }}
|
||||||
|
@endcomponent
|
||||||
|
@endsection
|
@ -4,4 +4,4 @@
|
|||||||
@component('portal.ninja2020.components.general.card-element-single', ['title' => 'Credit card', 'show_title' => false])
|
@component('portal.ninja2020.components.general.card-element-single', ['title' => 'Credit card', 'show_title' => false])
|
||||||
{{ __('texts.checkout_authorize_label') }}
|
{{ __('texts.checkout_authorize_label') }}
|
||||||
@endcomponent
|
@endcomponent
|
||||||
@endsection
|
@endsection
|
||||||
|
Loading…
x
Reference in New Issue
Block a user