I am implementing an assembly payment API for making payments using PHP. Everything is working well in a sandbox environment. But in production, it is giving an error message.
Credit card payment failed: Unable to process the purchase transaction. (2)
Code that I have implemented for making payment is:
$rest = curl_init();
curl_setopt($rest,CURLOPT_URL,$url);
curl_setopt($rest,CURLOPT_HTTPGET,1);
curl_setopt($rest,CURLOPT_CUSTOMREQUEST,"PATCH");
curl_setopt($rest,CURLOPT_POSTFIELDS,$accountdata);
curl_setopt($rest,CURLOPT_HTTPHEADER,$headers);
curl_setopt($rest,CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($rest,CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($rest);
$data = Zend_Json::decode($response);
return $data;
Where $url = https://secure.api.promisepay.com/items/wc5xxq6k-gkx0-jx5x-l1gm-xxxxxxx/make_payment