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')
<!-- 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>
<div id="paypal-button-container"></div>
<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({
env: "{{ $gateway->company_gateway->getConfigField('testMode') ? 'sandbox' : 'production' }}",
fundingSource: "{{ $funding_source }}",
client: {
@if($gateway->company_gateway->getConfigField('testMode'))
sandbox: "{{ $gateway->company_gateway->getConfigField('clientId') }}"
@else
production: "{{ $gateway->company_gateway->getConfigField('clientId') }}"
@endif
},
env: testMode ? 'sandbox' : 'production',
fundingSource: fundingSource,
client: testMode ? sandbox : production,
// Order is created on the server and the order id is returned
createOrder: function(data, actions) {
return "{!! $order_id !!}"
return orderId;
},
// Finalize the transaction on the server after payer approval
onApprove: function(data, actions) {
@ -64,8 +63,6 @@
}
}).render('#paypal-button-container');
</script>
@endpush