p500plus Posted January 18, 2017 Share Posted January 18, 2017 (edited) Zdravim, pracujem na jednom module pre platobnu branu. V pripade neuspesnej platby mam 2 moznosti ako na to reagovat. 1. nevytvarat objednavku a nechat zakaznika aby presiel cely proces objednavky znovat 2. vytvorim objednavku ale dam moznost zakaznikovi zaplatit. Prave pri druhom sposobe mam problem. Ak zakaznik ide znovu platit a na 2x sa mu podari zaplatit spracujem notifikacnu spravu a chcem zmenit stav objednavky. $history = new OrderHistory(); $history->id_order = (int)$orderId; $history->changeIdOrderState(Configuration::get('PAYMENT_OK'), (int)($orderId)); $history->addWithemail(true); Po vykonani vyssie uvedeneho kodu sa mi zmeni stav objednavky na OK avsak pri fakture mi zmizne sposob platby. *V obrazku je faktura a detail v inom jazyku ale robi to aj ked je nastaveny rovnaky jazyk. Ak si pozriem detail objednavky tak tam sposob platby vidim spravne. Vie niekto v com by to mohlo pripadne, ak robim nieco zle z toho co je popisane vyssie dajte mi vediet. Dakujem Edited January 18, 2017 by p500plus (see edit history) Link to comment Share on other sites More sharing options...
p500plus Posted January 18, 2017 Author Share Posted January 18, 2017 Cely problém bol v tom že v tabuľke "order_invoice_payment" chýbal záznam o vytvorenej faktúre. Riešenie bolo pridať danej objednávke faktúru. Pred vyššie uvedene riadky kódu stačilo pridať toto: $orderObj = new Order($orderId); $orderObj->setInvoice(true); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now