Skip to content

Instantly share code, notes, and snippets.

@MarGul
Created April 26, 2017 12:58
Show Gist options
  • Save MarGul/ae4fc8aef791929936e8b042db7948ec to your computer and use it in GitHub Desktop.
Save MarGul/ae4fc8aef791929936e8b042db7948ec to your computer and use it in GitHub Desktop.
/**
* Update the order reference.
*
* @param mixed $paymentId [The current paymentId]
* @param miced $to [What it should be updated to]
* @return [type] [description]
*/
public function updatePaymentReference($paymentId, $to) {
if ( empty($paymentId) || empty($to) ) {
throw new \Exception("Payment id and to must be set");
}
$url = $this->getOmniUrl() . '/checkout/payments/' . $paymentId . '/updatePaymentReference';
$response = $this->createJsonEngine($url, json_encode(array('paymentReference' => $to)), ResursCurlMethods::METHOD_PUT);
return $response;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment