<html>
<body>

<script src="https://www.paypalobjects.com/api/checkout.js"></script>
<script>
  paypal.Button.render({
    // Configure environment
    env: 'production',
    client: {
      sandbox: 'AcaMHeauY5hyppiCN-lQBIfO3xEN-Xp55b_aKMcy9MaD0GeOdCjlsyUvdU6O-9-VLhyr8oavVCuixlpc',
      production: 'AZ0SpJ4T8qn7eMFTK0XQg8_xP4av29Y87ynh1FVcPdnc88CF3gqHXzi5YSrmc9qyj6YroI2TA6oiDJJw'
    },
    // Customize button (optional)
    locale: 'en_SG',
    style: {
      size: 'small',
      color: 'gold',
      shape: 'pill',
    },

    // Enable Pay Now checkout flow (optional)
    commit: true,

    // Set up a payment
    payment: function(data, actions) {
    return actions.payment.create({
        transactions: [{
        amount: {
            total: '1',
            currency: 'SGD',
            
        },
        description: 'Registration Payment',
        custom: '90048630024435',
        invoice_number: 'IIW2020-001',
        payment_options: {
            allowed_payment_method: 'INSTANT_FUNDING_SOURCE'
        },
        soft_descriptor: 'IIW2020',
        item_list: {
            items: [
            {
            name: 'IIW2020 Registration',
            description: 'IIW2020 Registration',
            quantity: '1',
            price: '1',
            tax: '0.00',
            currency: 'SGD'
            }]
        }
        }],
        note_to_payer: 'Contact us for any questions on your order.'
    });
    },
    // Execute the payment
    onAuthorize: function(data, actions) {
      return actions.payment.execute().then(function() {
        // Show a confirmation message to the buyer
        window.alert('Thank you for your purchase!');
      });
    }
  }, '#paypal-button');

</script>

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

</body>
</html>