EB Custom Payment

More
9 years 8 months ago #84387 by Sean
EB Custom Payment was created by Sean
I have been working on a custom payment module for a little while now and thought I'd ask for help here with an issue I am seeing.

It's for a custom Paypal Payment option for a "monthly subscription" for an event. The goal is to calculate the number of months between now and the even and then break the payment down into the monthly subscription amount.

I have the stock Paypal plugin pulled down and edited as well as uploaded and enabled - however what happens is that on my individual event registration page I get a blank page. When I disable the plugin, the Event Registration page displays properly.

Does anyone spot anything obvious in the attached as I just simply can't spot the issue - I think I've been staring at it too long! :laugh:

Thanks!

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #84402 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic EB Custom Payment
Hi Sean

The name of the class should be os_paypalmonthly instead of os_paypal

If you use os_paypal as the class name, there would be two payment plugins with the same PHP class (original os_paypal and this one) and it causes fatal error

Tuan

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #84441 by Sean
Replied by Sean on topic EB Custom Payment
Thanks Tuan,

I can't believe I missed that. That resolved the initial issue but now when I click on the "Process Payment" button for the event, that is likewise going to a blank screen. Any ideas?

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #84442 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic EB Custom Payment
I could not read all the code of the payment plugin you customized to see the error, that's something you will need to figure out yourself

Go to Events Booking -> Configuration, set Debug Mode config option to Yes. It will set error reporting to max level and you should see the error message yourself

Then you can see what's wrong and continue fixing it. Still much work ahead :D

Tuan

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #84445 by Sean
Replied by Sean on topic EB Custom Payment
Found a few issues and am now investigating an "Invalid URL" message from the Paypal side. I will post the code here once I work that through.

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #84448 by Sean
Replied by Sean on topic EB Custom Payment
The attached code appears to be working at this time.

I couldn't locate the source of the Event Date so that is hard coded in there at this time. If you can point me towards the var name for the specific event that'd be awesome and clean up one section of the date calculations.

Hope this helps someone else out in the future.

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc