mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Updated translations
This commit is contained in:
parent
9f969d9f7a
commit
2efd4f55f0
@ -711,6 +711,29 @@ class CreateSingleAccount extends Command
|
||||
$cg->save();
|
||||
}
|
||||
|
||||
if (config('ninja.testvars.paypal_rest') && ($this->gateway == 'all' || $this->gateway == 'paypal_rest')) {
|
||||
$cg = new CompanyGateway;
|
||||
$cg->company_id = $company->id;
|
||||
$cg->user_id = $user->id;
|
||||
$cg->gateway_key = '80af24a6a691230bbec33e930ab40665';
|
||||
$cg->require_cvv = true;
|
||||
$cg->require_billing_address = true;
|
||||
$cg->require_shipping_address = true;
|
||||
$cg->update_details = true;
|
||||
$cg->config = encrypt(config('ninja.testvars.paypal_rest'));
|
||||
$cg->save();
|
||||
|
||||
$gateway_types = $cg->driver()->gatewayTypes();
|
||||
|
||||
$fees_and_limits = new stdClass;
|
||||
$fees_and_limits->{$gateway_types[0]} = new FeesAndLimits;
|
||||
|
||||
$cg->fees_and_limits = $fees_and_limits;
|
||||
$cg->save();
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (config('ninja.testvars.checkout') && ($this->gateway == 'all' || $this->gateway == 'checkout')) {
|
||||
$cg = new CompanyGateway;
|
||||
$cg->company_id = $company->id;
|
||||
|
@ -93,11 +93,17 @@ class PayPalRestPaymentDriver extends BaseDriver
|
||||
$data['client_id'] = $this->company_gateway->getConfigField('clientId');
|
||||
$data['token'] = $this->getClientToken();
|
||||
$data['order_id'] = $this->createOrder($data);
|
||||
$data['funding_options'] = $this->getFundingOptions();
|
||||
|
||||
return render('gateways.paypal.pay', $data);
|
||||
|
||||
}
|
||||
|
||||
private function getFundingOptions():string
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function processPaymentResponse($request)
|
||||
{
|
||||
|
||||
@ -152,6 +158,21 @@ class PayPalRestPaymentDriver extends BaseDriver
|
||||
|
||||
$order = [
|
||||
"intent" => "CAPTURE",
|
||||
"payer" => [
|
||||
"name" => [
|
||||
"given_name" => $this->client->present()->first_name(),
|
||||
"surname" => $this->client->present()->last_name(),
|
||||
],
|
||||
"email_address" => $this->client->present()->email(),
|
||||
"address" => [
|
||||
"address_line_1" => $this->client->address1,
|
||||
"address_line_2" => $this->client->address2,
|
||||
"admin_area_1" => $this->client->city,
|
||||
"admin_area_2" => $this->client->state,
|
||||
"postal_code" => $this->client->postal_code,
|
||||
"country_code" => $this->client->country->iso_3166_2,
|
||||
]
|
||||
],
|
||||
"purchase_units" => [
|
||||
[
|
||||
"description" =>ctrans('texts.invoice_number').'# '.$invoice->number,
|
||||
|
@ -84,6 +84,7 @@ return [
|
||||
'password' => 'password',
|
||||
'stripe' => env('STRIPE_KEYS', ''),
|
||||
'paypal' => env('PAYPAL_KEYS', ''),
|
||||
'paypal_rest' => env('PAYPAL_REST_KEYS', ''),
|
||||
'authorize' => env('AUTHORIZE_KEYS', ''),
|
||||
'checkout' => env('CHECKOUT_KEYS', ''),
|
||||
'travis' => env('TRAVIS', false),
|
||||
|
@ -5112,6 +5112,7 @@ $LANG = array(
|
||||
'mercado_pago' => 'Mercado Pago',
|
||||
'mybank' => 'MyBank',
|
||||
'paypal_paylater' => 'Pay in 4',
|
||||
'paid_date' => 'Paid Date',
|
||||
);
|
||||
|
||||
|
||||
|
@ -7,11 +7,11 @@ parameters:
|
||||
- '#Call to an undefined method .*badMethod\(\)#'
|
||||
- '#Call to an undefined method Illuminate\Database\Eloquent\Builder::exclude#'
|
||||
parallel:
|
||||
maximumNumberOfProcesses: 8
|
||||
maximumNumberOfProcesses: 1
|
||||
level: 4
|
||||
paths:
|
||||
- 'app/'
|
||||
excludePaths:
|
||||
- 'vendor/'
|
||||
universalObjectCratesClasses:
|
||||
- App\DataMapper\Tax\RuleInterface
|
||||
- App\DataMapper\Tax\RuleInterface
|
||||
|
@ -1,4 +1,4 @@
|
||||
@extends('portal.ninja2020.layout.payments', ['gateway_title' => ctrans('texts.payment_type_credit_card'), 'card_title' => ctrans('texts.payment_type_credit_card')])
|
||||
@extends('portal.ninja2020.layout.payments', ['gateway_title' => ctrans('texts.payment_type_credit_card'), 'card_title' => 'PayPal'])
|
||||
|
||||
@section('gateway_head')
|
||||
<link
|
||||
@ -28,7 +28,7 @@
|
||||
@endsection
|
||||
|
||||
@push('footer')
|
||||
<script src="https://www.paypal.com/sdk/js?components=buttons,hosted-fields&intent=capture&client-id={!! $client_id !!}" data-client-token="{!! $token !!}">
|
||||
<script src="https://www.paypal.com/sdk/js?buyer-country=DE¤cy=EUR&enable-funding={$funding_options}&components=buttons,hosted-fields,funding-eligibility&intent=capture&client-id={!! $client_id !!}" data-client-token="{!! $token !!}">
|
||||
</script>
|
||||
|
||||
<script>
|
||||
@ -55,40 +55,13 @@
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var FUNDING_SOURCES = [
|
||||
paypal.FUNDING.PAYPAL,
|
||||
paypal.FUNDING.CARD,
|
||||
paypal.FUNDING.VENMO,
|
||||
paypal.FUNDING.SEPA,
|
||||
paypal.FUNDING.BANCONTACT,
|
||||
paypal.FUNDING.EPS,
|
||||
paypal.FUNDING.GIROPAY,
|
||||
paypal.FUNDING.IDEAL,
|
||||
paypal.FUNDING.MERCADOPAGO,
|
||||
paypal.FUNDING.MYBANK,
|
||||
paypal.FUNDING.PAYLATER,
|
||||
paypal.FUNDING.P24,
|
||||
paypal.FUNDING.SOFORT,
|
||||
];
|
||||
|
||||
// Loop over each funding source
|
||||
FUNDING_SOURCES.forEach(function (fundingSource) {
|
||||
// Initialize the buttons
|
||||
var button = paypal.Buttons({
|
||||
fundingSource: fundingSource,
|
||||
})
|
||||
// Check if the button is eligible
|
||||
if (button.isEligible()) {
|
||||
// Render the standalone button for that funding source
|
||||
button.render('#paypal-button-container')
|
||||
},
|
||||
onError: function(err) {
|
||||
console.log(err);
|
||||
}
|
||||
})
|
||||
|
||||
}).render('#paypal-button-container');
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user