Jump to content
php.lv forumi

Paypal pieslēgšana - nestrādā file_get_contents


freak

Recommended Posts

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&notify_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&notify_version=2.1&custom=xyz123&invoice=abc1234&test_ipn=1&verify_sign=AFcWxV21C7fd0v3bYYYRCpSSRl31APAq1mANuPGicuDpo2akNEAzPC0y

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...