I'm sending this request on the json POST of Curl with PHP.
Here is post json:
"Payment" => ( "Type" => "Vendor", "Amount" => 100, "CreditCard" => ( "CardNumber" => "$card", "ExpirationDate" => "$dataexp" )
The default value for receipt on the ExpirationDate API is: 20/2021 XX / XXXX.
In "ExperationDate" => "", I want to concatenate the two variables ($ mes and $ year) with the / (slash). $ my + / + $ year or more on a single variable.
When I submit the ExpirationDate content, it must contain 12/2021 XX / XXXX.
They come from other script variables: $ Mes and $ year.
Returns this template by sending ExperationData to the publication API.
I have tried something like:
"ExperationDate" => "'.$mes.'/'.$ano.'" "ExperationDate" => "$mes/$ano.'" "ExperationDate" => "$mes./.$ano.'"
None of the 3 possibilities gave it to me. $ Mes and $ year are not concatenated with /. So, the default value, for example 10/2021, was not passed correctly in the POST object in json ExperationDate => ""
I have error in ExperationDate in api, the error is exactly at the point of two more variables / concatenated in ExperationDate.
Could someone help me to do this motive that I have shown?
Would it be possible to pass two variables and concatenated in a json object of the post?
thank you so much