go-live failure

conym18
Contributor
Contributor

Hello,

 

when i change the client-id into the live client-id, the javascript will not work.

 

 



  
  










  paypal.Buttons({
    createOrder: function(data, actions) {
      return actions.order.create({
        purchase_units: [{
          amount: {
            value: '0.01',
			currency_code: 'EUR'
		  },
			description: 'test'
        }]	
      });
    },
	
	style: {
		layout:  'vertical',
		color:   'silver',
		shape:   'rect',
		label:   'paypal',
	  },	
	
    onApprove: function(data, actions) {
      return actions.order.capture().then(function(details) {
        //alert('Bestellung erfolgreich ' + details.payer.name.given_name);
        window.location.href = 'fertig.php?amount=rwar';
		
        return fetch('/paypal-transaction-complete', {
          method: 'post',
          headers: {
            'content-type': 'application/json'
          },
          body: JSON.stringify({
            orderID: data.orderID
          })
        });
      });
    }
	
	
	
  }).render('#paypal-button-container');






  

 

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.