0
I’m sending this json request in the Curl POST with PHP.
Here the json of the POST:
"Payment" => [
"Type" => "Vendor",
"Amount" => 100,
"CreditCard" => [
"CardNumber" => "$card",
"ExpirationDate" => "$dataexp"
]
The default for receiving in the Expirationdate api is 20/2021 XX/XXXX .
Within the "Experationdate" => "",I want to concatenate the two variables ($month and $year) with the / (bar). $mes+/+$ano or this logic in a single variable. When I submit Expirationdate content should be 12/2021 XX/XXXX.
They come from other variables in the script. $mes and $ano.
Returns this pattern by sending in Experationdata to the api in the post.
I tried something like:
"ExperationDate" => "'.$mes.'/'.$ano.'"
"ExperationDate" => "$mes/$ano.'"
"ExperationDate" => "$mes./.$ano.'"
None of the three possibilities I got. $mes and $ano did not concatenate with /.Thus the pattern ex: 10/2021 was not correctly passed in the object POST in json Experationdate => ""
I have an error in Experationdate in api, the error is exactly at the crossing point of two variables plus / concatenated in Experationdate.
Could someone help me make this pattern I showed you? It would be possible to pass two variables and concatenated inside a post json object ?
Sincerely yours Thank you