Skrypt ma polegać na tym, że wpisujemy swój numer konta odpowiedzialna jest za to <b>Account name/login:</b> <input type="text" name="custom" value=""> a następnie przechodzimy do strony z płatnościami, po dokonanej płatności powinien edytować się plik o nazwie której podaliśmy w Account name/login:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="xxx@gmail.com"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="item_name" value="XXX Premium points"> <b>Account name/login:</b> <input type="text" name="custom" value=""> <select name="amount"> <option value="1.00">1 EUR</option> </select> <input type="hidden" name="button_subtype" value="products"> <input type="hidden" name="currency_code" value="EUR"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="currency_code" value="EUR"> <input type="hidden" name="notify_url" value="http://localhost/index.php?subtopic=ipn"> <input type="hidden" name="return" value="http://localhost/"> <input type="hidden" name="rm" value="0"> <input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest"> <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" onclick="return confirm('UWAGA! Jeśli jesteś pewien, że postac jest [Wylogowana] kliknij OK.')" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> </center>
Proszę zwrócić uwagę na fukcje " Account name/login: <input type="text" name="custom" value="">" wpisujemy tam numer konta, następnie przechodzimy na stronę płatności, po dokonanej płatności ma być uruchamiany skrypt, który edytuje plik .xml o nazwie której podaliśmy w Account name.. Lecz po dokonanej płatności skrypt nie działa, aczkolwiek nie edytuje pliku.
Tutaj IPN, który ma edytować plik po dokonanej transakcji:
$players_folder = $todata.'/players/'; $acc_folder = $todata.'/accounts/'; include("config.php"); if(gethostbyaddr($_SERVER['REMOTE_ADDR']) != 'notify.paypal.com') { } if($_REQUEST['debug']) { } $payer_email = $_REQUEST['payer_email']; $receiverEmail = $_REQUEST['receiver_email']; $paymentStatus = $_REQUEST['payment_status']; $mcGross = $_REQUEST['mc_gross']; $mcCurrency = $_REQUEST['mc_currency']; $receiver = 'xxx@gmail.com'; $currency = 'EUR'; if($paymentStatus == 'Completed' && $receiverEmail == $receiver && $mcCurrency == $currency) { [b] $file = $players_folder.$custom.'.xml'; { $xml = simplexml_load_file($custom); $xml['access'] = 3; $xml->asXML($custom); } } ?>[/b]
Proszę o pomoc, bardzo mi na tym zależy, jeśli ktoś wie jak zintegrować paypal proszę o kontakt, jestem w stanie zapłacić za pomoc. Cenę uregulujemy po kontakcie.