Paypal button redirect to thank you page

New Member
1 0 0

Hello guys! There is a problem! How to tell the store what the customer paid successfully in paypal?
The client comes in, enters his data, then he clicks on the button and pays for the purchase and then he returns to the site but the site does not see what he bought! How to properly generate a successful payment page in shopify

For example

 onApprove: function(data, actions) {
          return actions.order.capture().then(function(details) {
              alert('Transaction completed by ' + + '!');

I need change this Alert to navigate and go to shopify! But which link i need paste ? Thank you