public function createPaymentRequestOrder(PaymentRequest $paymentRequest)
 {
     $customer = $this->bpc->getCustomer($this->cm->getCustomerByUser($paymentRequest->getUser())->getBalancedUri());
     $order = $customer->orders->create();
     $order->description = $paymentRequest->getTitle();
     $order->meta = ['payment_request_id' => $paymentRequest->getId()];
     $order->save();
     $paymentRequestOrder = new PaymentRequestOrder();
     $paymentRequestOrder->setBalancedUri($order->href)->setPaymentRequest($paymentRequest);
     $this->em->persist($paymentRequestOrder);
     $this->em->flush($paymentRequestOrder);
     return $paymentRequestOrder;
 }
 public function getPublicId()
 {
     $this->__load();
     return parent::getPublicId();
 }