Here you have a php example (from the Magento API manual) on how to create an order with the needed calls:
/**
* Example of order creation
* Preconditionsare as follows:
* 1. Create a customer
* 2. Сreate a simple product */
$user = 'apiUser';
$password = 'apiKey';
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl');
$sessionId = $proxy->login($user, $password);
$cartId = $proxy->shoppingCartCreate($sessionId, 1);
// load the customer list and select the first customer from the list
$customerList = $proxy->customerCustomerList($sessionId, array());
$customer = (array) $customerList[0];
$customer['mode'] = 'customer';
$proxy->shoppingCartCustomerSet($sessionId, $cartId, $customer);
// load the product list and select the first product from the list
$productList = $proxy->catalogProductList($sessionId);
$product = (array) $productList[0];
$product['qty'] = 1;
$proxy->shoppingCartProductAdd($sessionId, $cartId, array($product));
$address = array(
array(
'mode' => 'shipping',
'firstname' => $customer['firstname'],
'lastname' => $customer['lastname'],
'street' => 'street address',
'city' => 'city',
'region' => 'region',
'telephone' => 'phone number',
'postcode' => 'postcode',
'country_id' => 'country ID',
'is_default_shipping' => 0,
'is_default_billing' => 0
),
array(
'mode' => 'billing',
'firstname' => $customer['firstname'],
'lastname' => $customer['lastname'],
'street' => 'street address',
'city' => 'city',
'region' => 'region',
'telephone' => 'phone number',
'postcode' => 'postcode',
'country_id' => 'country ID',
'is_default_shipping' => 0,
'is_default_billing' => 0
),
);
// add customer address
$proxy->shoppingCartCustomerAddresses($sessionId, $cartId, $address);
// add shipping method
$proxy->shoppingCartShippingMethod($sessionId, $cartId, 'flatrate_flatrate');
$paymentMethod = array(
'po_number' => null,
'method' => 'checkmo',
'cc_cid' => null,
'cc_owner' => null,
'cc_number' => null,
'cc_type' => null,
'cc_exp_year' => null,
'cc_exp_month' => null
);
// add payment method
$proxy->shoppingCartPaymentMethod($sessionId, $cartId, $paymentMethod);
// place the order
$orderId = $proxy->shoppingCartOrder($sessionId, $cartId, null, null);
If I'm not mistaken (could be, was a while back since I changed something in payment methods) each payment method has a block class Info
and a corresponding info.phtml
template.
For example, looking at moneybookers it has the class Phoenix_Moneybookers_Block_Info
with the template moneybookers/info.phtml
This is the file which is included in the emails so if you include the QR code there (or whichever payment method you want to change) it should be displayed correctly in the email.
Best Answer
To enter the payment as paypal (standard) use:
Where xxxxxxxxxxxx is your transaction id. You also need to invoice the order after you created it with the API
salesOrderInvoiceCreate
.