payment_api
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| payment_api [2019/03/18 16:20] – mibase | payment_api [2019/03/18 17:27] (current) – mibase | ||
|---|---|---|---|
| Line 53: | Line 53: | ||
| The PHP code to add | The PHP code to add | ||
| - | $inputData = array(); | ||
| + | {{: | ||
| - | //input data is a named array with keys | ||
| - | //{ surname => , borid => , librarycode => , key => , amount => } | ||
| - | //eg | ||
| - | /* | ||
| - | $inputData[' | ||
| - | $inputData[' | ||
| - | |||
| - | $inputData[' | ||
| - | |||
| - | $inputData[' | ||
| - | |||
| - | $inputData[' | ||
| - | |||
| - | */ | ||
| - | |||
| - | $postdata = http_build_query($inputData); | ||
| - | |||
| - | |||
| - | $context_options = array(' | ||
| - | |||
| - | array( | ||
| - | | ||
| - | ' | ||
| - | | ||
| - | ' | ||
| - | | ||
| - | . " | ||
| - | | ||
| - | ' | ||
| - | ) | ||
| - | ); | ||
| - | |||
| - | |||
| - | $context = stream_context_create($context_options); | ||
| - | |||
| - | |||
| - | $result = file_get_contents(' | ||
| - | false, $context); | ||
| - | |||
| - | |||
| - | $outData = json_decode($result); | ||
payment_api.1552886408.txt.gz · Last modified: 2019/03/18 16:20 by mibase