Browse Source

some edits for angular...

master
dfstorm 1 year ago
parent
commit
c42bd9f6c6
  1. 27
      index.php

27
index.php

@ -13,9 +13,8 @@
It's not allowed to make card data transit trough
your servers in production context.
NOTE: Allow Origin headers are handled by the web server.
*/
header('Content-Type: application/json');
header("Access-Control-Allow-Origin: *");
class ksportRelay {
public $rInput = array(
"accessKeyRef" => null,
@ -140,18 +139,22 @@
// Validate post input.
function input() {
$sPostData = file_get_contents("php://input");
$rPostData = json_decode($sPostData, true);
if (
isset($_POST['accessKeyRef']) &&
isset($_POST['data']) &&
isset($_POST['cardNumber']) &&
isset($_POST['cardExpirationDate']) &&
isset($_POST['cardCvx'])
isset($rPostData['accessKeyRef']) &&
isset($rPostData['data']) &&
isset($rPostData['cardNumber']) &&
isset($rPostData['cardExpirationDate']) &&
isset($rPostData['cardCvx'])
) {
$this->rInput["accessKeyRef"] = $_POST['accessKeyRef'];
$this->rInput["data"] = $_POST['data'];
$this->rInput["cardNumber"] = $_POST['cardNumber'];
$this->rInput["cardExpirationDate"] = $_POST['cardExpirationDate'];
$this->rInput["cardCvx"] = $_POST['cardCvx'];
$this->rInput["accessKeyRef"] = $rPostData['accessKeyRef'];
$this->rInput["data"] = $rPostData['data'];
$this->rInput["cardNumber"] = $rPostData['cardNumber'];
$this->rInput["cardExpirationDate"] = $rPostData['cardExpirationDate'];
$this->rInput["cardCvx"] = $rPostData['cardCvx'];
return true;
} else {
return false;

Loading…
Cancel
Save