Magento – SOAP order inserting: How to stipulate the payment method

orderssoap

I'm attempting to add orders through the soap api.
I am wondering about how to fill in the payment method array

The docs gives this as a sample

$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
    );

How about when the payment is not CC.. How do we put external transaction numbers in here? For instance when the order was entered via paypal, I'd like to include the PayPal transaction information (client name, or at least transaction number)

Am I missing something?

Best Answer

To enter the payment as paypal (standard) use:

$paymentMethod = array(
         'method' => 'paypal_standard',
         'last_trans_id' => 'xxxxxxxxxxxx'
     );

Where xxxxxxxxxxxx is your transaction id. You also need to invoice the order after you created it with the API salesOrderInvoiceCreate.

Related Topic