forked from LiveCarta/PayPal-PHP-SDK
Fixed Double JSON Encoding
- Updated PPModel to not double encode urls in Json String.
This commit is contained in:
@@ -218,7 +218,10 @@ class PPModel
|
||||
*/
|
||||
public function toJSON($options = 0)
|
||||
{
|
||||
return json_encode($this->toArray(), $options);
|
||||
// Because of PHP Version 5.3, we cannot use JSON_UNESCAPED_SLASHES option
|
||||
// Instead we would use the str_replace command for now.
|
||||
// TODO: Replace this code with return json_encode($this->toArray(), $options | 64); once we support PHP >= 5.4
|
||||
return str_replace('\\/', '/', json_encode($this->toArray(), $options));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user