Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

capture invoice? 
 
Thomas Hygum
Member
 
Total Posts:  36
Joined:  2009-02-25
 

i’m trying to capture an invoice by soap, but it gives me a soap error.

I use this:

$notInvoicedOrderId  '100000003';
$invoice $client->call($session'sales_order_invoice.capture'$notInvoicedOrderId);

but it gives an error:

Fatal errorUncaught SoapFault exception[100] Requested shipment not existsin /home/caleidos/public_html/faktura-test.php:69 Stack trace#0 [internal function]: SoapClient->__call('call', Array) #1 /home/caleidos/public_html/faktura-test.php(69): SoapClient->call('a9207ccb3def71e...', 'sales_order_inv...', '100000003') #2 {main} thrown in /home/caleidos/public_html/faktura-test.php on line 69

why cant i capture that order? my purpose with all this is to get the invoice send to the customer and the downloadable product to be available.

Below is the sales_order.list output for order 100000003:

[2] => Array
        (
            
[increment_id] => 100000003
            [parent_id] 
=> 0
            [store_id] 
=> 1
            [created_at] 
=> 2009-04-01 10:12:11
            [updated_at] 
=> 2009-04-01 10:12:11
            [is_active] 
=> 1
            [customer_id] 
=> 3
            [tax_amount] 
=> 0.0000
            [shipping_amount] 
=> 0.0000
            [discount_amount] 
=> 0.0000
            [subtotal] 
=> 10.0000
            [grand_total] 
=> 10.0000
            [total_paid] 
=> 0.0000
            [total_refunded] 
=> 0.0000
            [total_qty_ordered] 
=> 0.0000
            [total_canceled] 
=> 0.0000
            [total_invoiced] 
=> 0.0000
            [total_online_refunded] 
=> 0.0000
            [total_offline_refunded] 
=> 0.0000
            [base_tax_amount] 
=> 0.0000
            [base_shipping_amount] 
=> 0.0000
            [base_discount_amount] 
=> 0.0000
            [base_subtotal] 
=> 10.0000
            [base_grand_total] 
=> 10.0000
            [base_total_paid] 
=> 0.0000
            [base_total_refunded] 
=> 0.0000
            [base_total_qty_ordered] 
=> 0.0000
            [base_total_canceled] 
=> 0.0000
            [base_total_invoiced] 
=> 0.0000
            [base_total_online_refunded] 
=> 0.0000
            [base_total_offline_refunded] 
=> 0.0000
            [shipping_tax_amount] 
=> 0.0000
            [base_shipping_tax_amount] 
=> 0.0000
            [billing_address_id] 
=> 10
            [billing_firstname] 
=> Thomas
            [billing_lastname] 
=> Hygum
            [billing_name] 
=> Thomas Hygum
            [store_to_base_rate] 
=> 1.0000
            [store_to_order_rate] 
=> 1.0000
            [base_to_global_rate] 
=> 1.0000
            [base_to_order_rate] 
=> 1.0000
            [weight] 
=> 0.0000
            [remote_ip] 
=> 87.55.170.86
            [customer_email] 
=> thomashygum@domain.com
            [customer_firstname] 
=> Thomas
            [customer_lastname] 
=> Hygum
            [global_currency_code] 
=> 0.0000
            [base_currency_code] 
=> DKK
            [store_currency_code] 
=> DKK
            [order_currency_code] 
=> DKK
            [applied_rule_ids] 
=> 
            
[shipping_method] => 
            
[shipping_description] => 
            
[state] => new
            
[status] => pending
            [store_name] 
=> Main Website
Main Store
English
            [quote_id] 
=> 24
            [customer_group_id] 
=> 1
            [customer_note_notify] 
=> 1
            [customer_is_guest] 
=> 0
            [is_virtual] 
=> 1
            [email_sent] 
=> 1
            [order_id] 
=> 3
        
)
 
Magento Community Magento Community
Magento Community
Magento Community
 
evdat
Member
 
Avatar
Total Posts:  35
Joined:  2008-02-28
Carthage, MO
 

The capture call is looking for an Invoice Increment Id, not to be confused with the order’s Increment Id. You will first need to create an invoice, and after the invoice is created, use the new invoices increment id to feed the capture call.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top