HEX
Server: nginx/1.28.1
System: Linux 10-41-63-61 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User: www (1001)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: //proc/37321/root/www/wwwroot/www.baofufacai.com/2.php
 
<!DOCTYPE html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="https://www.paypalobjects.com/api/checkout.js?components=buttons"></script>
</head>
<body>
    产品名称<br>
    价格:10$ <br>
<div id="paypal-button" style="margin-top:100px;"></div>
<script>
    paypal.Button.render({
        
 
        
        
        
        locale: 'zh_CN', //语言
        env: 'production', //生成环境还是沙盒环境
        commit: true,   
        client: {
            sandbox:    'AUM51Ny6aVSUH0eP4bUHk3L_J68yPVAeMWoxlVZSTMLxtYoohKhFHvi4G1HwaST8bo44D3Ym19XJhLz0',
            production: 'AUM51Ny6aVSUH0eP4bUHk3L_J68yPVAeMWoxlVZSTMLxtYoohKhFHvi4G1HwaST8bo44D3Ym19XJhLz0'
        },
        style: {
            // size: 'small',
            // color: 'silver',
            // shape: 'pill',
            // label: 'checkout',
            // tagline: false
              layout: 'vertical',
            //   size: 'small',
    color:  'gold',
    shape:  'rect',
    label:  'paypal'
        },
        payment: function(data, actions) {
            return actions.payment.create({
                payment: {
                    transactions: [
                        {
                            amount: { total: '180', currency: 'USD' }
                        }
                    ]
                }
            });
        },
        onAuthorize: function(data, actions) {
            console.log(data);
            return actions.payment.execute().then(function(payment) {
                $.ajax({
                    type: 'POST',
                    url: '/',
                    data: {}
                }).done(function (data) {
                    if (data == '0') {
                        alert('支付完成!');
                        window.location.reload();
                    }else {
                        alert('支付失败')
                    }
                })
            });
        },
        onCancel: function(data, actions) {
             // 买家取消了支付触发
             // TODO
        },
        onError: function(err) {
            // 当交易发生错误时触发
            // TODO
        }
    }, '#paypal-button');
</script>
</body>