javascript - Paypal return url with Angular app -


this part of router.js:

  .state('app.thanks', {         url: "/thanks",         views: {           'menucontent': {             templateurl: "templates/thanks.php"           }         }       }) 

and in payapl website payment preferences -> return url address define this: https://my-website-url.com/#/app/thanks,

as understand, in order params payapl need use code transaction id:

if(isset($_get['tx']) && ($_get['tx'])!=null && ($_get['tx'])!= "") {     $tx = $_get['tx'];     if($tx) dosometing(); } else {     exitcode(); } 

how can combine angular app? need put code in thanks.php page?

thanks!!

you cannot step angular app. has clear since need verify transaction , payment paypal. properly, code has run on server , validated payment process successful, otherwise can hand out products free. did not add code here hope have 1 ready properly.

after verifying transaction on server own script can redirect user right location on angular app. setup , script should similar -

website payment preferences -> https://my-website-url.com/paypalverify.php

if ( isset($_get['tx']) && $_get['tx'] ) {     $tx = $_get['tx'];     if(verifytx($tx)) {         //do stuff         header('location: https://my-website-url.com/#/app/thanks');         die();     }    } header('location: https://my-website-url.com/#/app/wheresmymoney'); die(); 

Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -