b0y-101 Mini Shell


Current Path : E:/www/b-group.old/spfin/paymentall/
File Upload :
Current File : E:/www/b-group.old/spfin/paymentall/payn1.php

<?php
require_once("config/config.php");
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://core.demo-paco.2c2p.com/api/1.0/Payment/prePaymentUi',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
  "paymentType": "CC",
  "paymentCategory": "ECOM",
  "orderNo": "TT1650866348558",
  "productDescription": "Merchant Test Tool 1650866348389",
  "mcpFlag": "N",
  "transactionAmount": {
    "currencyCode": "THB",
    "amount": "1",
    "decimalPlaces": 2,
    "amountText": "000000000100"
  },
  "channelCode": "WEBPAY",
  "request3dsFlag": "N",
  "autoRedirectDelayTimer": 5,
  "notificationURLs": {
    "confirmationURL": "http://confirmation-url2c2p.com",
    "failedURL": "http://failed-url2c2p.com",
    "cancellationURL": "http://cancellation-url2c2p.com",
    "backendURL": "http://backend-url2c2p.com"
  },
  "recurringPaymentDetails": {
    "rppFlag": "N"
  },
  "generalPayerDetails": {
    "personType": "General",
    "seqNo": 1,
    "personName": {
      "title": "Mr.",
      "firstName": "Merchant Test Tool User"
    }
  },
  "installmentPaymentDetails": {
    "ippFlag": "N"
  },
  "officeId": "2206",
  "apiRequest": {
    "requestMessageID": "3fd2e3e7-f5a9-4cee-5599-f0e7fffb995c",
    "requestDateTime": "2022-04-25T07:54:45.696Z",
    "language": "en-US"
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Accept: application/json',
    'apiKey:'. $apikey,
    'Content-Type: application/json; charset=utf-8'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;



var_dump($response);

?>

Copyright © 2019 by b0y-101