/** * @return PaymentRequestBuf * @throws \Exception */ public function getPaymentRequest() { // Serialize the payment details, and apply a signature based on instance of PaymentRequestSigner $this->request->setSerializedPaymentDetails($this->details->serialize()); if (!$this->request->hasSignature()) { $this->request = $this->signer->apply($this->request); } return $this->request; }