Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $quote=Mage::getSingleton('checkout/session')->getQuote();
- $billingAddress=$quote->getBillingAddress()->addData($this->addressData);
- $shippingAddress=$quote->getShippingAddress()->addData($this->addressData);
- $shippingAddress->setCollectShippingRates(true)->collectShippingRates()
- ->setShippingMethod('flatrate_flatrate')
- ->setPaymentMethod('checkmo');
- $quote->getPayment()->importData(array('method' => 'cc','cc_type'=>'visa','cc_number_enc'=>'4111111111111111','cc_owner'=>'Bob Men','cc_last4'=>'5687','cc_exp_month'=>7,'cc_exp_year'=>2020));
- $quote->setCustomerIsGuest(true)
- ->setCustomerGroupId(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID);
- $quote->getPayment()->setMethod('ccsaved');
- $quote->getPayment()->setCcType('Visa');
- $quote->getPayment()->setCcNumber('4111222244445555');
- $quote->getPayment()->setCcOwner('Danniel N J klkj');
- $quote->getPayment()->setLast4(4242);
- $quote->getPayment()->setCcExpMonth(6);
- $quote->getPayment()->setCcExpYear(2023);
- $quote->collectTotals()->save();
- $quote->save();
- $service = Mage::getModel('sales/service_quote', $quote);
- $service->submitAll();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement