freak Posted February 7, 2017 Report Share Posted February 7, 2017 Mēģinu pieslēgt paypal, bet nesaprotu kāpēc file_get_contents neko neatgriež (tukšums), kad slēdzos paypal. Piemēram, <?php $url="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_notify-validate&payment_type=echeck&payment_date=Wed%20Jan%2011%202017%2017%3A01%3A15%20GMT%2B0200%20(FLE%20Standard%20Time)&payment_status=Completed&address_status=confirmed&payer_status=verified&first_name=John&last_name=Smith&payer_email=buyer@paypalsandbox.com&payer_id=TESTBUYERID01&address_name=John%20Smith&address_country=United%20States&address_country_code=US&address_zip=95131&address_state=CA&address_city=San%20Jose&address_street=123%20any%20street&business=seller@paypalsandbox.com&receiver_email=seller@paypalsandbox.com&receiver_id=seller@paypalsandbox.com&residence_country=US&item_name=something&item_number=AK-1234&quantity=1&shipping=3.04&tax=2.02&mc_currency=USD&mc_fee=0.44&mc_gross=12.34&mc_gross_1=12.34&txn_type=web_accept&txn_id=767130003¬ify_version=2.1&custom=xyz123&invoice=abc1234&test_ipn=1&verify_sign=AFcWxV21C7fd0v3bYYYRCpSSRl31APAq1mANuPGicuDpo2akNEAzPC0y"; echo file_get_contents($url); ?> , bet ja šo pašu url atver browserī, tad atgriež VERIFIED. URL: https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_notify-validate&payment_type=echeck&payment_date=Wed%20Jan%2011%202017%2017%3A01%3A15%20GMT%2B0200%20(FLE%20Standard%20Time)&payment_status=Completed&address_status=confirmed&payer_status=verified&first_name=John&last_name=Smith&payer_email=buyer@paypalsandbox.com&payer_id=TESTBUYERID01&address_name=John%20Smith&address_country=United%20States&address_country_code=US&address_zip=95131&address_state=CA&address_city=San%20Jose&address_street=123%20any%20street&business=seller@paypalsandbox.com&receiver_email=seller@paypalsandbox.com&receiver_id=seller@paypalsandbox.com&residence_country=US&item_name=something&item_number=AK-1234&quantity=1&shipping=3.04&tax=2.02&mc_currency=USD&mc_fee=0.44&mc_gross=12.34&mc_gross_1=12.34&txn_type=web_accept&txn_id=767130003¬ify_version=2.1&custom=xyz123&invoice=abc1234&test_ipn=1&verify_sign=AFcWxV21C7fd0v3bYYYRCpSSRl31APAq1mANuPGicuDpo2akNEAzPC0y Quote Link to comment Share on other sites More sharing options...
waplet Posted February 7, 2017 Report Share Posted February 7, 2017 allow_url_fopen ? Quote Link to comment Share on other sites More sharing options...
freak Posted February 7, 2017 Author Report Share Posted February 7, 2017 Pati funkcija file_get_contents strādā visām citām lapām. Quote Link to comment Share on other sites More sharing options...
Val Posted February 7, 2017 Report Share Posted February 7, 2017 sākumā ieslēdz error reporting Quote Link to comment Share on other sites More sharing options...
freak Posted February 7, 2017 Author Report Share Posted February 7, 2017 Warning: file_get_contents() [function.file-get-contents]: SSL operation failed with code 1. OpenSSL Error messages: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure in.... Quote Link to comment Share on other sites More sharing options...
jurchiks Posted February 7, 2017 Report Share Posted February 7, 2017 Ko tu tur dari un kāpēc tu neizmanto https://github.com/paypal/PayPal-PHP-SDK ? Quote Link to comment Share on other sites More sharing options...
Roze Posted February 9, 2017 Report Share Posted February 9, 2017 Cik jauns/vecs php un openssl (būtu jābūt vismaz 1.0.1) ir uz servera? Proti, pirms kāda laika Paypal nogrieza visu izņemot TLS1.2 (SSLv3 noteikti vairs neatbalsta) ( https://devblog.paypal.com/upcoming-security-changes-notice/) attiecīgi uz vecākām serveru OS/php versijām varētu kā reiz nekas vairs neiet. Visvienkāršāk pārbaudīt vai ir atbalsts ir uztaisīt pliku php lapu ar <? phpinfo(); ?> un tad atvērt to pārlūkā un tad pie augšējā tabulā pie 'Registered Stream Socket Transports' paskatīties vai tur ir tlsv1.2 - ja tur ir tikai ssl/tls/tls 1.0, tad pa lielam nekas cits neatliks kā atjaunot programmatūru uz webservera. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.