b0y-101 Mini Shell


Current Path : E:/www/b-group.old/spfin - Copy/paymentget/
File Upload :
Current File : E:/www/b-group.old/spfin - Copy/paymentget/index.php

<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://core.demo-paco.2c2p.com/api/2.0/Payment/prePaymentUI', [
  'body' => '{"apiRequest":{"requestMessageID":"e952828c-6d19-4a08-92e4-1bc47e1945a2","requestDateTime":"2023-08-29T09:12:34.001Z","language":"en-US"},"installmentPaymentDetails":{"ippFlag":"Y","installmentPlanGroup":"PlansForGadget","installmentPlan":"PlansForGadget","interestType":"C","installmentPeriod":10,"bankProductCode":"500736"},"recurringPaymentDetails":{"rppFlag":"Y","orderNoPrefix":"M-Ref 61000","recurringIntervalNumber":1,"recurringInterval":"Monthly","recurringChargeDateOnMonth":"12","recurringTimes":"5","recurringAutoAccumulate":"Y","recurringStartDate":"2023-12-28","recurringEndDate":"2023-12-27","recurringStatus":"Y"},"transactionAmount":{"amountText":"000000999950","currencyCode":"THB","decimalPlaces":2,"amount":9999.5},"originalTransactionAmount":{"amountText":"000000999950","currencyCode":"THB","decimalPlaces":2,"amount":9999.5},"notificationURLs":{"confirmationURL":"http://.../ConfirmationURL.aspx","failedURL":"http://.../ErrorURL.aspx","cancellationURL":"http://.../CancellationURL.aspx","backendURL":"http://.../backendURL.aspx"},"generalPayerDetails":{"personType":"general","personName":{"fullName":"Mr. John Doe","title":"Mr.","firstName":"John","middleName":"","lastName":"Doe"},"seqNo":1,"email":"John@2c2p.com","mobilePhone":"+66861234567","businessPhone":"+6621167000","emailForFxReceipt":"John@2c2p.com"},"airlineData":{"recordLocator":"string","flightDetail":[{"AirlineCode":"string","FlightNumber":"string","BookingClass":"string","IsReturnFlight":true,"IsTransitFlight":true,"IsStopoverFlight":true,"ReservationCode":"string","DepartureAirport":"string","DepartureCity":"string","DepartureDateTime":"string","ArrivalAirport":"string","ArrivalCity":"string","ArrivalDateTime":"string"}],"passengerDetail":[{"FirstName":"string","LastName":"string","NameInPNR":"string","Gender":"string","PassengerType":"string","Email":"string","PhoneNumber":"string"}]},"officeGroupId":"2206","officeId":"string","terminalID":"75002084","orderNo":"684105191128073630","productDescription":"URRT55","paymentCategory":"ECOM","paymentType":"CC-VI","preferredPaymentTypes":["CC","IPP"],"paymentExpiryDateTime":"2023-08-30T23:59:59.999Z","channelCode":"WEBPAY","agentCode":"FPX_SBIA","mcpFlag":"N","preferredMcpType":"DCC","request3dsFlag":"string","storedCardList":[{"storedCardUniqueID":"string"}],"initialRecurringFlag":"string","autoRedirectDelayTimer":0,"purchaseItems":[{"purchaseItemType":"ticket","referenceNo":"2322460376026","purchaseItemDescription":"Bundled insurance","purchaseItemPrice":{"amountText":"000000999950","currencyCode":"THB","decimalPlaces":2,"amount":9999.5},"subMerchantID":"string","passengerSeqNo":1},{"purchaseItemType":"ticket","referenceNo":"2322460376026","purchaseItemDescription":"Bundled insurance","purchaseItemPrice":{"amountText":"000000999950","currencyCode":"THB","decimalPlaces":2,"amount":9999.5},"subMerchantID":"string","relationship":"spouse"}],"customFieldList":[{"fieldName":"ExternalID5","fieldValue":"AMADEUS"}]}',
  'headers' => [
    'accept' => 'application/json',
    'apiKey' => '7068c343afa741ea978abe75a1b22d51',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();

Copyright © 2019 by b0y-101