Add translation for Venmo

This commit is contained in:
David Bomba 2023-10-16 16:49:47 +11:00
parent 15941b8273
commit 92e3f05e8b

View File

@ -29,24 +29,23 @@
@push('footer') @push('footer')
<!-- Replace "test" with your own sandbox Business account app client ID -->
<script src="https://www.paypal.com/sdk/js?client-id={!! $client_id !!}&components=buttons,funding-eligibility&intent=capture" data-client-token="{!! $token !!}"></script> <script src="https://www.paypal.com/sdk/js?client-id={!! $client_id !!}&components=buttons,funding-eligibility&intent=capture" data-client-token="{!! $token !!}"></script>
<div id="paypal-button-container"></div> <div id="paypal-button-container"></div>
<script> <script>
const fundingSource = "{!! $funding_source !!}";
const testMode = {{ $gateway->company_gateway->getConfigField('testMode') }};
const clientId = "{{ $gateway->company_gateway->getConfigField('clientId') }}";
const sandbox = { sandbox: clientId };
const production = { production: clientId };
const orderId = "{!! $order_id !!}";
paypal.Buttons({ paypal.Buttons({
env: "{{ $gateway->company_gateway->getConfigField('testMode') ? 'sandbox' : 'production' }}", env: testMode ? 'sandbox' : 'production',
fundingSource: "{{ $funding_source }}", fundingSource: fundingSource,
client: { client: testMode ? sandbox : production,
@if($gateway->company_gateway->getConfigField('testMode'))
sandbox: "{{ $gateway->company_gateway->getConfigField('clientId') }}"
@else
production: "{{ $gateway->company_gateway->getConfigField('clientId') }}"
@endif
},
// Order is created on the server and the order id is returned // Order is created on the server and the order id is returned
createOrder: function(data, actions) { createOrder: function(data, actions) {
return "{!! $order_id !!}" return orderId;
}, },
// Finalize the transaction on the server after payer approval // Finalize the transaction on the server after payer approval
onApprove: function(data, actions) { onApprove: function(data, actions) {
@ -64,8 +63,6 @@
} }
}).render('#paypal-button-container'); }).render('#paypal-button-container');
</script> </script>
@endpush @endpush