Home › Forums › Community Forum › last payment time is wrong
This topic contains 13 replies, has 5 voices. Last updated by LG 4 years, 2 months ago.
Topic Author | Topic |
---|---|
Posted: Friday Oct 5th, 2012 at 5:21 am #27547 | |
|
|
Hi, I want to show the next payment date to user in edit profile page. I checked the code, database, even find the file and placed the code also and its shows also. But in the end i checked the last payment date of user in database field ‘wp_s2member_last_payment_time’ is wrong . I wrote all my code which find the next payment date according to last payment by user. Please send me the alternative of my requirement ( show the next payment date to user ) OR let me know how and where to change the code so that ‘wp_s2member_last_payment_time’ saves the updated value in database Thanks |
List Of Topic Replies
Author | Replies |
---|---|
Author | Replies |
Posted: Friday Oct 5th, 2012 at 12:07 pm #27584 | |
|
|
Hello LG, Could you please post the date that you were expecting, and the date that you got? Thanks. :) – Eduan |
|
Posted: Saturday Oct 6th, 2012 at 7:21 am #27637 | |
|
|
[hilite pre_code]
$s2member_last_payment_time = get_user_field ("s2member_last_payment_time"); # Timestamp. Last time an actual payment was received by s2Member. [/hilite] Should give what you want, why do you say it’s wrong? Maybe it’s because of the time difference between the server and you? I would also like to know what time it happened and what time is stored. You can also use the payment notifications together with a script to save each payment. [hilite path]Dashboard -› s2Member® -› API / Notifications -› Payment Notifications[/hilite] |
|
Posted: Tuesday Oct 9th, 2012 at 1:26 pm #27909 | |
|
|
HI, Thanks for replying. It shows the time when the paid membership user registered instead last recurring payment date. |
|
Posted: Wednesday Oct 10th, 2012 at 6:52 am #27970 | |
|
|
I see. I’m going to ask Jason about it, but tell me, are you sure that that user made another payment after signup? |
|
Posted: Wednesday Oct 10th, 2012 at 9:17 pm #28056 | |
|
|
Hi LG, Can you check to see if If that’s not working for you either, please make sure that your PayPal IPN URL is set up correctly within PayPal. If you have logging enabled, you should check out your paypal-ipn.log file to ensure that it is getting populated. If you do not have a paypal-ipn.log file, then this is most likely your issue.
Technically, if your IPN URL is wrong, you could still be getting user signups, because user upgrades/downgrades are done within the PayPal Return processes, or within WP_Cron in
/includes/classes/auto-eots.inc.php . However, this problem, and also a problem where all of your subscription-based members would not be downgraded would occur.
Let us know how that goes :-) |
|
Posted: Thursday Oct 11th, 2012 at 1:47 am #28080 | |
|
|
Hi Cristián And Bruce, Thanks for help . I tried this get_user_field(‘s2member_paid_registration_times’) and its shows the same time as And i checked my Paypal account and it receives the payment on regular basis from users but as i told you the last payment date field is not updated in the database. :( |
|
Posted: Thursday Oct 11th, 2012 at 3:07 am #28086 | |
|
|
Hi LG, Thanks for the info.As you can see in the Codex (Source Code Docs), s2Member does
The first file is the class for the recurring payments, and the second is for the signup for the subscription. I’m going to run tests to try to get this to happen in a test environment. For now I suggest using get_user_field (“s2member_auto_eot_time”) – 1 day to display the date that users will be billed again. If this field is not being populated correctly either, then I would suggest disabling all plugins possible (except s2Member) and running test transactions until the problem is resolved. Thanks for your patience. |
|
Posted: Thursday Oct 11th, 2012 at 8:34 am #28120 | |
|
|
Hi Bruce, But i guess .. get_user_field (“s2member_auto_eot_time”) … This shows the End Of Time when user cancel their payment. My requirement is different , i want user to show next payment date ( without cancelling their account ), thats why i need last payment date so that i can add the plan days in that and can show user the next payment date. If you have any other solution to my requirement then that would be great as well. Thanks |
|
Posted: Thursday Oct 11th, 2012 at 12:19 pm #28142 | |
|
|
Hi LG, Could you please post a list of other plugins you’re running with s2Member? just copy + pasting the list from /wp-admin/plugins.php should suffice. :-) |
|
Posted: Friday Oct 12th, 2012 at 12:55 am #28189 | |
|
|
Hi Bruce, These are Active plugin in my website
|
|
Posted: Friday Oct 12th, 2012 at 10:15 pm #28286 | |
|
|
Hi LG, Thanks for the info.I’ve started an investigation on this. I’m going to get back to you as soon as I can reproduce this issue. |
|
Posted: Tuesday Oct 16th, 2012 at 12:03 am #28491 | |
|
|
Thanks for the heads up on this thread.Regarding the next billing date. This is NOT something that s2Member keeps a record of on-site. s2Member keeps track of the last time a payment was received, but not when the next payment is set to occur. This is maintained by your payment gateway. If you’re running PayPal, then the next billing date is established on the PayPal side of things. s2Member is fully aware of transactions, cancellations, expirations, failed billing attempts, and other events that occur with a billing profile established on the payment gateway side of things, because s2Member communicates with your payment gateway through a combination of APIs, including things like the PayPal IPN service. However, personal billing details, other financials, and billing cycle specifics are left on the payment gateways side of things for maximum flexibility and security. If you’re running PayPal Pro, it’s possible to obtain the billing profile details from the PayPal side of things programmatically – via the PayPal Pro API. While it’s not something that s2Member keeps a record of on-site, s2Member does have the ability to pull this information for you from the PayPal API. Here is a code snippet that shows how to accomplish this:
The Related thread: http://www.primothemes.com/forums/viewtopic.php?f=4&t=2062&view=unread#p7407 |
|
Posted: Tuesday Oct 16th, 2012 at 6:27 am #28501 | |
|
|
HI Jason, Thanks for replying and clearing everything , that is really helpful. I know s2Member didn’t keeps a record of next payment on site but i need the last payment date ( which is stored in database whenever user paid ). With the help of last payment date and days in current member membership i will calculate the next payment date. But for that i need the last payment date first which is stored wrong in database by s2membership plugin , that us my problem, i just need the last payment date :) Looking forward to hear from you soon. Thanks |
This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.