User Tools

Site Tools


payment_api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
payment_api [2019/03/17 20:26] mibasepayment_api [2019/03/18 17:27] (current) mibase
Line 11: Line 11:
  
 Australia/ACT Australia/ACT
 +
 Australia/Melbourne Australia/Melbourne
 +
 Australia/Perth Australia/Perth
 +
 Australia/Brisbane Australia/Brisbane
 +
 Pacific/Auckland Pacific/Auckland
 +
 +
  
 Cut and paste your key from settings into notepad for testing Cut and paste your key from settings into notepad for testing
Line 45: Line 51:
 In the page on your website that returns a successful payment insert the following php code. Assign the values that are returned from the payment process. In the page on your website that returns a successful payment insert the following php code. Assign the values that are returned from the payment process.
  
-<?php +The PHP code to add
- +
- +
-$inputData = array(); +
- +
- +
- +
-$inputData['surname'] = 'Smith'; +
-$inputData['borid'] = '200'; +
-$inputData['librarycode'] = 'demo'; +
-$inputData['key'] = 'xxxxx'; +
-$inputData['amount'] = '55.00'; +
- +
- +
- +
-$postdata = http_build_query($inputData); +
- +
-$context_options = array('http' =>  +
-    array( +
-        'method' => 'POST', +
-        'header' => "Content-type: application/x-www-form-urlencoded\r\n"+
-         "Content-Length: " . strlen($postdata) . "\r\n", +
-        'content' => $postdata +
-    ) +
-); +
- +
-$context = stream_context_create($context_options); +
- +
-$result = file_get_contents('https://' . $inputData['librarycode'] .'.mibase.com.au/home/api/RecPayment.php', false, $context); +
- +
-echo $result;+
  
  
 +{{:api:code.jpg?800|}}
  
  
  
-  
  
payment_api.1552814789.txt.gz · Last modified: 2019/03/17 20:26 by mibase

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki