<br>
Hello paypaliens friends,
I come to you because I have a problem which I can not find a solution.
I want to send $_POST from the previous apage to paypal's RSET pay page.
For that, at first, I create entries in php, to be able to access it in Javascript.
<?php
foreach ($_POST as $cle => $valeur) {
echo "<input type='hidden' id='" . $cle . "' name='" . $cle . "' value='" . $valeur . "'></input>";
} ?>
Then in my JAVA script, I will look for these values to integrate them into return paypal.request.post(
<script>
var infos_post = "";
for (var i = 1; i <= document.getElementsByTagName("input").length; i++){
if (document.getElementsByTagName("input").item(i-1).type == "hidden") {infos_post += document.getElementsByTagName("input").item(i-1).value;}
}
window.alert(infos_post);
[...] PAYPAL [...]
onAuthorize: function(data, actions) {
return paypal.request.post("Paypal.php",{
infos_post,
//paymentID: data.paymentID,
//payerID: data.payerID,
});
},
</script>
But obviously, it does not work, do you know how can I do it?
Thanks a lot for your help !!
... View more