Integration Problem: How can I add the Invoice-number?

Richie90
Contributor
Contributor

Hi, Im using this standard Code: echo '<script src="https://www.paypalobjects.com/api/checkout.js"></script>

<div id="paypal-button-container"></div>

<script>

    // Render the PayPal button

    paypal.Button.render({

        // Set your environment

        env: \'production\', // sandbox | production

        // Specify the style of the button

        locale: \'de_DE\',
        style: {
            label: \'checkout\',
            size:  \'small\',    // small | medium | large | responsive
            shape: \'pill\',     // pill | rect
            color: \'gold\'      // gold | blue | silver | black
        },

        // PayPal Client IDs - replace with your own
        // Create a PayPal app: https://developer.paypal.com/developer/applications/create

        client: {
            production: \'Production_ID\'
        },

        payment: function(data, actions) {
            return actions.payment.create({
                payment: {
                    transactions: [
                        {
                            amount: { total: '.$_POST['gesamtsumme'].', currency: \'EUR\' }
                        }
                    ]
                }
            });
        },

        onAuthorize: function(data, actions) {
            return actions.payment.execute().then(function() {
                window.alert(\'Payment Complete!\');
            });
        }

    }, \'#paypal-button-container\');

</script>';

 

I see : Amount XY was sent by XY But I dont know to which Invoice that payment belongs to... How can I add the Invoice-Number?

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.