Jump to:
| Project: | lm_paypal |
| Version: | 6.x-2.x-dev |
| Component: | LM Paypal Paid Adverts |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Hi, to everyone.
There is a content type describing the advertisement of a product, having four fields named "Product name", "Product description", "Product images" and "Product price". "lm_paypal's paid advert" has been used to publish the node submitted by the user.
So, far everything is fine, The present scenario is something like the following :-
1. The user logs into the website.
2. Then he/she places an advertisement.
3. Then they move to their "My Account" page and subscribe to paypal from there.
4. Then admin approves the subscription, then the advertisement is getting listed in the views display.
But, my actual requirement is something like the following :-
1. The user logs into the website.
2. Then he/she places an advertisement.
3. When they click the submit/save button of the "advertisement" content type form, then it should directly take them to paypal and the payment functionalities should be over there and on returning from paypal the subscribed node should be present in the view list display.
Please guide/suggest me for achieving this.
Thanking You,
Pradeep.
Comments
#1
Hi to everyone,
The 4th point of my description of the present scenario is incorrect, I came to know this now only. I am very much sorry for this.
Actually, I think after payment/subscription of a certain node some time is getting consumed for the completeness of the functionality.
But, I really want to instantaneously show the paid node in the views display.
I request you all out there, Please feel free to reply me if I am unable to make understand you guys (Because my english is not so good.), or redirect me if I am posting my issue in the queue where it shouldn't be.
Thanking you all, especially to this module developer's. Great module.
Pradeep.
#2
Hi to everyone,
I was able to achieve the instant subscription to paypal after node submission, by the very helpful function "hook_form_alter" and change the redirect path to the paypal functioanilty.
But there is a time gap between the subscription of the node and it's publishment. How can this be reduced, so that the node will be displayed as soon as the subscription ends.
I am using a views display to show all the paid nodes, and thus place the view path in the return url of the subscription settings.
Any or all guidance/sugesstions will be very much helpful to me.
Thanking you,
Pradeep.
#3
The delay may be from PayPal. The IPN is usually delivered by he time the user returns to the site, but when there is network or server congestion, it can take some time for the IPNs to reach the module. Another issue mentioned as much as 48 hours for IPN delivery.
#4
Hi, John
Thank you very much for your response to this issue. Is there anyway so that I can publish the node as soon as it gets paid for publishment?
Thank you,
K Pradeep Kumar
#5
kpdru,
Can you post your hook_form_alter code for all to see as an example? I'm trying to do something similar.
Thanks!
#6
Hi Pradeep,
I'm also interested in having this functionality -- so that people are instantly redireced to the payment gateway.
Could you please attach a .zip or .txt version of your LM_Paypal module with the hook_form_alter magic?
Thank you very much in advance
#7
-
#8
Hi Everybody,
Sorry for the delay, because I was busy with some other work.
I was able to redirect the control to the lm_paypal subscription after node submission by the help of a custom module and using the hook_form_alter function.
function MY_MODULE_form_alter(&$form, $form_state, $form_id) {
if (isset($form['#node']) && $form['#node']->type .'_node_form' == $form_id) {
$form['buttons']['submit']['#submit'][] = 'advertisement_redirect_handler';
}
}
function MY_MODULE_redirect_handler($form, &$form_state) {
if ($form_state['nid']) {
$form_state['redirect'] = 'node/'.$form_state['nid'].'/lm_paypal';
}
}
Please feel free to rectify/enhance this if it has a scope for.
Thanks,
Pradeep.