Closed (fixed)
Project:
e-Commerce
Version:
6.x-4.0-rc22
Component:
ec_paypal
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Oct 2010 at 17:23 UTC
Updated:
4 Nov 2010 at 17:03 UTC
The following hook code works fine when the product "smsupdate" has a price of 0, but when the price is set to a number and the purchase goes through Paypal, then the hook does not fire (though everything else in ecommerce seems fine). I thought it might be the ecommerce version I was on, which was an older beta 4, but I've just upgraded to the latest and have same problem...
Is it my code?
function smsupdate_ec_txn_workflow($txn, $orig_txn) {
if (ec_store_transaction_workflow('type_code', $txn->workflow) == EC_WORKFLOW_TYPE_COMPLETE) {
foreach ($txn->items as $node) {
$customer = $txn->customer;
if ($node->type=='smsupdate') {
smsupdate_insert($txn->txnid, $node, $customer=$txn->customer);
drupal_goto('/subscriber_trading_diary_subscriptions');
}
}
}
}
Any tips?
Comments
Comment #1
Bimble commented$txn in _ec_txn_workflow($txn, $orig_txn) changes between hook calls. There are not the same elements for 'apply' as 'buy', and so my code didnt work.