Anyone get aMember working properly with AlertPay and want to lend me a hand? I have it working to the point of where if you go to /amember/signup.php and fill in your info it will take you to alertpay's signup form, however after you sign up with alertpay and pay, your aMember membership doesn't end up getting activated.
I am also having problems to make alertpay work with amember. The alertpay payment page does not load when coming from the signup page at /amember/signup.php I get this error on the alertpay site, "Sorry, the return URL field cannot be left empty. Please try again." Please help.
I found the solution to the problem of "Sorry, the return URL field cannot be left empty. Please try again." in /plugins/payment/alertpay/alertpay.inc.php 'ap_return_url' must be changed to 'ap_returnurl' I will let you know if I find other problems/solutions.
In regards to the problem of memberships not activating after payment, I believe I found the source of the problem. I removed this text from ipn.php if (md5($this_config[secret]) != $vars[securitycode]){ alertpay_error(_PLUG_PAY_ALERTPAY_ERROR); } and it works now! There are still errors in the error log in amember but memberships are now automatically activated. By removing it, it seems the security code is not verified. If anyone knows a better solution, please let me know.
Thanks for the help. I thought the problem may have been with the security code. I tried putting the security code into the aMember plugin as encrypted, and as non-encrypted and neither would end up without giving an error in the debug log.
I discovered this in the alertpay.ipn.php file (all the way to the bottom) you need to change header("Location: http://www.alertpay.com/PayProcess.aspx?$vars"); to header("Location: https://www.alertpay.com/PayProcess.aspx?$vars"); NOTICE THE httpS
the ap_securitycode is there to make sure that payment postings are in fact from alertpay. This is an optional setting so it is NOT required by AlertPay but if you have a high volume or high risk website I would recommend to get this to work before you take too many payments. I have not figured it out yet but I will. I have people using paypal that change the price all the time or try and fool my website by sending their own posts to it. For me it is not an option it is a requirement
Try changing if (md5($this_config[secret]) != $vars[securitycode]){ alertpay_error(_PLUG_PAY_ALERTPAY_ERROR); } to if (!$vars['ap_securitycode'] == $this_config['secret']){alertpay_error(_PLUG_PAY_ALERTPAY_ERROR);}
Ok I have done several test transactions and they are all working just fine now. I would call this a fix You still get the debug info in the error logs but i want to keep that on for a month or two, just to be sure. Goodluck guys and thanks for the first tip.
In alertpay.inc.php find: $vars += array( 'aps_period'=> alertpay_get_interval_unit($product->config['expire_days'], 'expire_days'), 'aps_intervals'=> alertpay_get_interval_mult($product->config['expire_days'], 'expire_days'), ); Change to: $vars += array( 'ap_timeunit'=> alertpay_get_interval_unit($product->config['expire_days'], 'expire_days'), 'ap_periodlength'=> alertpay_get_interval_mult($product->config['expire_days'], 'expire_days'), );
Thanks for that fix There is another problem with the plugin however, it will not properly recognize recurring subscriptions... so if you're doing recurring subscriptions, members will not be re-activated for another month even if alertpay charges them
I do not use recurring subscriptions so I have no way to really test this. I might have some time this weekend to take a look at it but I doubt it. My days are full again.
Well I see that they have fixed this code, but the "Incorrect secret code" seems to still be a problem... I have tried using the plain-text code and the encrypted one and they both die...
Hi I have opened the ticket but it doesn't appear in the "Open Tickets" page! Can you please post the solution here?? Thanks
I have managed to fix the recurring payment activation issue myself... In the alertpay folder edit /ipn.php replace: Code: if ($status != 'Success') alertpay_error(_PLUG_PAY_ALERTPAY_ERROR2); with: Code: if ($status != 'Success' && $status != 'Subscription-Payment-Success' && $status != 'Subscription-Canceled') alertpay_error(_PLUG_PAY_ALERTPAY_ERROR2); Have tested it and all seems OK now! FIXED Thanks
I have the next error in the setup instalation plugin to alertpay. In the step two when I click in the url show "Incorrect secret code". Help me please
It should generate that error when you try to open notifications url from browser. That url should be accessed only by Alertpay server.