2017-07-01 8 views
0

私のサンドボックスアプリに問題があります。私は、私のWebアプリでpaypal checkout特急支払いのために与えられたスクリプトを統合しました。これはスクリプトです:Paypal Sandboxアプリのログインエラー

<script src="https://www.paypalobjects.com/api/checkout.js"></script> 
<div id="paypal-button-container"></div> 
<script> 
    var total = 0; 
    $.getJSON("/Home/getTotal", function (result) { 
     total = result; 
    }); 
    // Render the PayPal 
    paypal.Button.render({ 

     // Set your environment 

     env: 'sandbox', // sandbox | production 

     // Specify the style of the button 

     style: { 
      label: 'buynow', 
      fundingicons: true, // optional 
      branding: true // optional 
     }, 

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

     client: { 
      sandbox: 'AT9iydEDhcqfM_dhU8MR0lvkFgZBjD1oXQVrG-CR9CyK_vd-aXpNzEnyVV7um_hAPrkqQX8JhtjGCbBt' 
     }, 

     // Wait for the PayPal button to be clicked 

     payment: function (data, actions) { 
      return actions.payment.create({ 
       transactions: [ 
        { 
         amount: { total: total, currency: 'USD' } 
        } 
       ] 
      }); 
     }, 

     // Wait for the payment to be authorized by the customer 

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

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

</script> 

このコードはpaypalボタンを表示します。ボタンをクリックすると、支払いページに進むためのログインページが表示されます。問題は:私が持っているpaypalアカウントでこのページにログインすることはできません。私はどこかでこのページにログインするためにサンドボックスのテストアカウントだけを使用することができますが、ペイパルアカウントを持っている人は誰でもこのページにログインできるようにしたいと考えています。私は何をすべきか ?あなたの答えをありがとう!

+0

コードのようにPayPalアプリを作成しましたか? – Claies

+0

はい、私は2つのサンドボックスアプリケーション –

+1

を作成しました。誰もがログインできるようにしたい場合、サンドボックスではなくプロダクションアカウントを使用する必要があります。 – Hosar

答えて

0

私は解決策を見つけました。支払いのページにすべての人がログインできるようにするには、運用モードに移行する必要があります。

関連する問題