private function createPayment() { $paymentData = new Registry(['invoice_id' => $this->invoice->id, 'method' => $this->state->get('payment_method'), 'amount' => $this->order->total, 'status' => 'pending', 'customer_payment_information' => $this->order->paymentinfos]); /** @var Sp4kAppsPaymentItem payment */ $this->payment = Sp4kAppsPaymentApp::getInstance($paymentData)->getItem(); $this->process_payment_result = $this->payment->charge(); //$this->ref_id = time(); }
/** * @param Registry | null $state * * @return \Sp4kAppsPaymentItem * */ public function getItemInstance(Registry $state = null) { return Sp4kAppsPaymentItem::getInstance($state); }