Posted: November 15, 2022 at 11:04 pm
Hi Folks, Please reply to me ASAP. Thanks for your cooperation as always. |
|
Hi there, Generally, we don’t walk through the steps to create a custom payment method on the forums. If you are unsure, I recommend taking a look at a similar payment method we’ve already created and compare with that. For example, Moneris looks like it’s an ‘On-site’ payment method (where you enter your card details on your own site and it posts to the data to the Moneris Gateway to process. So try taking a look at another on-site payment method to compare how that works, for example, PayPal Pro is included within core and would give you a working example of this.
From where?
Depends on what the Moneris integration requires, but yes, likely the do_direct_payment() method.
EE creates an EE_Payment object which is passed throughout the payment method, you would update that with the response. Again take a look at the PayPal pro payment method as it gives you a work example of this. |
|
From the settings form of the payment method. |
|
Could you please guide me to the PayPal pro directory? In event-espresso-core-master\payment_methods I can only see two Paypal Standard and Paypal express, which one is the pro one or none of them is Paypal pro? |
|
Ok, I think it is in the caffeinated directory. |
|
I would assume you would not be asking how to get the values of a form, from within the form your working on… Right? So, where are you wanting to pull these values of the settings form into? Where in the payment method you are creating?
Neither, those are PayPal standard and PayPal express.
This is correct. |
|
You are partially correct but I want to get the form fields value in the do_direct_payment function.
Yes Exactly |
|
I write code for integration but didn’t see any errors in the logs my ajax request got failed all the time and I can’t see any error in the error log. How can I see any error If I have one in my code written inside do_direct_payment? |
|
I don’t follow how that’s partially correct? If you have the EE_Payment_method object for your current payment method (which you can get from the
Seems to be some confusion on what I’m asking here. I was asking for the location you are trying to pull in the settings form, you can do it differently depending ‘where’ in the code you are trying to pull those values. The above doesn’t tell me anything other than within your payment method, but nothing about the location within that payment method. The reply above states do_direct_payment, so I’ve gone with that.
They would show up in the PHP error logs as long as your site is configured to log errors. Try using this snippet: https://eventespresso.com/wiki/troubleshooting-checklist/#wpdebug Within your site’s |
|
So to avoid confusion I am trying to clarify the things:
I have done that but nothing seems to be logged in the file. |
|
You can use the method I mentioned above: https://eventespresso.com/topic/moneris-payment-integeration/#post-337117
Then you can pull in individual fields from the payment method settings using
$field = $payment_method->
Would return the value of that field.
What response code are you getting from the ajax request? |
|
|
|
|
|
https://www.screenpresso.com/=5Srbb |
|
An ajax request is a standard request, it’s just a request sent in the background. The fact you are getting error 500 return and the ‘critical error’ message, means it’s a PHP Fatal error and those should be stored within the server’s error logs, if they aren’t then your server isn’t set up to log errors. Actually, scratch that, your site is logging the errors, I’ve just checked the Take a look in /wp-content/debug.log and you’ll see a Fatal from your custom payment method. |
|
No error in debug.log is logged related to the custom payment gateway. |
|
There was when I checked the log on the 22nd but looks like the log file has now been deleted as all log entries are from the 24th. Set the site to display errors and then view the response of the ajax request in dev tools, it should show up there. |
|
The support post ‘Moneris Payment Integeration’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.