Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

257
Views
Botón inteligente de PayPal: cómo editar la URL de redireccionamiento

Estoy tratando de ingresar un enlace de URL de redireccionamiento en mi código generado por el botón inteligente de PayPal y no sé cómo hacerlo. Espero obtener ayuda aquí, por favor.

Quiero poder redirigir a los clientes a, por ejemplo, ( https://www.example.com/request/ ) después de un pago exitoso.

A continuación se muestra el código del botón inteligente de Paypal:

 function initPayPalButton() { paypal.Buttons({ style: { shape: 'rect', color: 'gold', layout: 'vertical', label: 'paypal', }, createOrder: function(data, actions) { return actions.order.create({ purchase_units: [{"description":"Digital Service","amount":{"currency_code":"USD","value":1}}] }); }, onApprove: function(data, actions) { return actions.order.capture().then(function(orderData) { // Full available details console.log('Capture result', orderData, JSON.stringify(orderData, null, 2)); // Show a success message within this page, eg const element = document.getElementById('paypal-button-container'); element.innerHTML = ''; element.innerHTML = '<h3>Thank you for your payment!</h3>'; // Or go to another URL: actions.redirect('thank_you.html'); }); }, onError: function(err) { console.log(err); } }).render('#paypal-button-container'); } initPayPalButton();
about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

Debe comentar la primera parte y descomentar la segunda parte, así:

 // Show a success message within this page, eg // const element = document.getElementById('paypal-button-container'); // element.innerHTML = ''; // element.innerHTML = '<h3>Thank you for your payment!</h3>'; // Or go to another URL: actions.redirect('https://www.example.com/thankyou/');
about 4 years ago · Juan Pablo Isaza Report

0

// Or go to another URL: actions.redirect('thank_you.html');

La respuesta a su pregunta está en el ejemplo de código, justo aquí.

about 4 years ago · Juan Pablo Isaza Report

0

function redirect(url){ window.setTimeout(function(){ window.location.href = url; }, 300); }
 <button onclick="redirect("https://www.google.com")">Redirect</button>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!