1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Update paypal for fraudnet

This commit is contained in:
David Bomba 2024-08-02 12:54:26 +10:00
parent 3e79df8809
commit 1d754758ee
2 changed files with 16 additions and 7 deletions

View File

@ -173,6 +173,13 @@ class PayPalRestPaymentDriver extends PayPalBasePaymentDriver
})->implode("\n");
$order = [
"payer" => [
"name" => [
"given_name" => $this->client->present()->first_name(),
"surname" => $this->client->present()->last_name()
],
"email_address" => $this->client->present()->email(),
],
"intent" => "CAPTURE",
"payment_source" => $this->getPaymentSource(),
"purchase_units" => [

View File

@ -14,10 +14,12 @@
@endphp
@section('gateway_head')
<!-- <meta http-equiv="Content-Security-Policy" content="
img-src 'self' https://c.paypal.com https://b.stats.paypal.com;
frame-src 'self' https://c.paypal.com;
script-src 'self' https://c.paypal.com;"> -->
<meta http-equiv="Content-Security-Policy" content="
frame-src 'self' https://c.paypal.com https://www.sandbox.paypal.com https://www.paypal.com;
script-src 'self' 'unsafe-inline' 'unsafe-eval' https://c.paypal.com https://www.paypalobjects.com https://www.paypal.com https://www.sandbox.paypal.com/;
img-src * data: 'self';
style-src 'self' 'unsafe-inline';"
>
@endsection
@section('gateway_content')
@ -86,7 +88,7 @@
}
</script>
<!-- <script type="text/javascript" src="https://c.paypal.com/da/r/fb.js"></script> -->
<script type="text/javascript" src="https://c.paypal.com/da/r/fb.js"></script>
@if(isset($merchantId))
<script src="https://www.paypal.com/sdk/js?client-id={!! $client_id !!}&merchant-id={!! $merchantId !!}&components=card-fields" data-partner-attribution-id="invoiceninja_SP_PPCP"></script>
@ -185,8 +187,8 @@
// Render each field after checking for eligibility
if (cardField.isEligible()) {
const nameField = cardField.NameField();
nameField.render("#card-name-field-container");
// const nameField = cardField.NameField();
// nameField.render("#card-name-field-container");
const numberField = cardField.NumberField({
inputEvents: {