Nodes not getting published after paying the money
poseidon123 - May 19, 2008 - 09:22
| Project: | PayPal Node |
| Version: | 5.x-1.2 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Well I have successfully used it on my site but when members are paying the money, the nodes gets created as Not Published and I have manually publish them which kills the whole purpose of using this module. I am using this for a CCK sponsor and in it, the default option is published. So what can be the problem ?

#1
also /admin/content/report is also don't show any transactoin even though many people have paid.
On my server I am having 4.x, is that the problem ? also I have manually edited the paypalnode.module file to make 10 as fixed pricing since the module wasn't picking the price. I had edited at 3 places, though I don't think this is causing the problem.
What else is causing the problem ?
#2
I'm seeing the same issues in my testing with a 5.3 system. Have you discovered the cause yet? I'll keep investigating on my side...
#3
No, Nothing happened :( I am still having same problem
#4
I've found one approach to work around this issue, but it might not be right for everyone. First, I only wanted one price for all nodes submitted regardless of categories, so I changed the function paypalnode_calculate_fee and hardcoded a return value for the dollar value I wanted. Second, I could see that the point of failure seemed to be in the function paypalnode_nodeapi:
$amount = paypalnode_calculate_fee($node->nid);if($amount > 0) {
// make sure the new node is unpublished until payment is made
db_query('UPDATE {node} SET status = 0, changed = %d WHERE nid = %d AND vid = %d', time(), $node->nid, $node->vid);
// Redirect to the paypal form for price calculation
$_REQUEST['destination'] = 'paypalnode/'.$node->nid;
} else {
_paypalnode_complete($node, 0);
drupal_set_message(t('Your ad was published!'));
}
I could never make the $amount come back as zero, which I guess is required in order to enter the 'else' clause and therefor mark the node published through _paypalnod_complete(). I never quite figured out how that mechanism was supposed to work properly, but I thought it could have something to do with paypalnode_calculate_fee() although I couldn't see it.
So to force the publication, I found that I could get the node published in the function paypalnode_thanks() when it checks for payment_status Request attribute:
// Check if the payment completed straight away, if so redirect to advertif(check_plain($_REQUEST['payment_status']) == 'Completed') {
_paypalnode_complete($node);
drupal_goto('node/'.$node_id);
}
Since I didn't care about calculating fees, comparing gross cost to the payment, etc., I think this will get the node published where all the intended publishing paths were getting missed, and it will still collect the payment. If you see any holes in this approach, I'd appreciate the feedback.
#5
Is it working for you ? the biggest problem with this module is testing :(
#6
Yes, it seems to be working but it is only in a test environment with the PayPal sandbox currently. I can create a node, collect the charge from Paypal, and return to see that the node is published. I still need to clean up several things to make the final implementation presentable. My biggest challenge has been that I want to do something different (simpler in a way) from the original intent of the module, so I've customized the module for my own purposes. Testing will definitely be a challenge now.
#7
subscribing