Recently, I used php to buy a service for a bank, using the bank's own enterprise network banking interface. Now I have a problem. After the payment is successful, the Bank still needs to call a callback function that I have written. However, this function always fails to be verified. Can anyone give an example? The payment return interface publicf... recently used php to buy a service for a bank, using the bank's own enterprise network banking interface. Now we have a problem,
After the payment is successful, the Bank still needs to call a callback function that I have written, but the verification fails. Can anyone give an example?
// Payment return Interface
Public function receivehandle (){
$ File = '. /138/Lib/Action/Mopro/data.txt '; $ check = file_get_contents ("php: // input"); file_put_contents ($ file, $ check ); // processing method include ('. /index. php '); // manually load the processing method include (". /Lib/Action/Mopro/Common/function. php "); $ exs = explode ('& Plain =', $ check); // var_dump ($ exs); $ this-> log ('line 59 ret ', var_export ($ exs); // The split string gets two parameters $ signature = $ exs [0]; $ exp = explode ('signature = ', $ Signature ); $ signature = $ exp [1]; $ plain = $ exs [1]; $ plain = urldecode ($ plain); $ plain = explode ('& ResponseCode = 100 ', $ plain); $ plain = $ plain [0]; echo $ plain.'
'. $ Signature; exit ('1'); // signature verification link $ ret = srdecode ($ plain, $ Signature ); // $ this-> log ('line 80 ret ', var_export ($ ret); // 1: Pass, 0: Do not pass $ arrall = array ();
Reply content:
Recently, I used php to buy a service for a bank, using the bank's own enterprise network banking interface. Now we have a problem,
After the payment is successful, the Bank still needs to call a callback function that I have written, but the verification fails. Can anyone give an example?
// Payment return Interface
Public function receivehandle (){
$ File = '. /138/Lib/Action/Mopro/data.txt '; $ check = file_get_contents ("php: // input"); file_put_contents ($ file, $ check ); // processing method include ('. /index. php '); // manually load the processing method include (". /Lib/Action/Mopro/Common/function. php "); $ exs = explode ('& Plain =', $ check); // var_dump ($ exs); $ this-> log ('line 59 ret ', var_export ($ exs); // The split string gets two parameters $ signature = $ exs [0]; $ exp = explode ('signature = ', $ Signature ); $ signature = $ exp [1]; $ plain = $ exs [1]; $ plain = urldecode ($ plain); $ plain = explode ('& ResponseCode = 100 ', $ plain); $ plain = $ plain [0]; echo $ plain.'
'. $ Signature; exit ('1'); // signature verification link $ ret = srdecode ($ plain, $ Signature ); // $ this-> log ('line 80 ret ', var_export ($ ret); // 1: Pass, 0: Do not pass $ arrall = array ();