Jump to content

Payment base class + PaymentStripe + PaymentPaypal


apeisa

Recommended Posts

6 hours ago, bernhard said:

i was curious, this worked for me: https://jsfiddle.net/3L0cdjsj/5/

Bernhard!!! I think that'll work. I modified the form markup you fiddled to make the amount field a text field rather than hidden and was able to complete the transaction with a custom amount I entered. I still have to test it some more but wow, thank you for the assistance.

  • Like 1
Link to comment
Share on other sites

Additionally, you don't need a PayPal account - you can pay with your CC without signing up.

I am not defending PayPal - I actually think it's a pretty ugly system to use, but it does mostly get the job done however you need. You'll always have more flexibility with other services though. In Canada, Moneris is a reasonable option - not modern like Stripe etc, but it can be completely hidden from the user - ie everything happens on your site with no redirect.

  • Like 2
Link to comment
Share on other sites

5 hours ago, adrian said:

In Canada, Moneris is a reasonable option - not modern like Stripe etc, but it can be completely hidden from the user - ie everything happens on your site with no redirect.

They have "USA CODE SAMPLE"s as well, eg: https://developer.moneris.com/Documentation/NA/E-Commerce Solutions/API/Refund?lang=php

I guess it means US based companies are OK too, right? I am asking this because I still need to decide what to pick when I get to the ecommerce features of the site I'm still building... Have you already implemented ecommerce features for a ProcessWire site based on Moneris?
I do not want to highjack this topic, btw...

Link to comment
Share on other sites

10 hours ago, szabesz said:

Have you already implemented ecommerce features for a ProcessWire site based on Moneris?

Yes, I have, although as I mentioned I am not saying it's an awesome service, but it seems to be relatively commonly used in Canada and so I thought it might be helpful for @digitex I have also used PayPal, Sallie Mae, and Frontstream with PW. Lots of options out there :)

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

Recently came across the fact that if you use PaymentPaypal, on redirect Paypal shows it's United States customer form regardless what country a customer had chosen on the Processwire website. Maybe somebody mentioned this earlier or even provided a fix. If not: The PaymentPaypal module apparently does not tell Paypal the customer's country. To fix this, add this after line 16 in modules/PaymentPaypal/payment_form.php:

<input type="hidden" name="country" value="<?= $customer->country ?>">

Now the Paypal page shows the correct customer form for payment data (and later the right country in Paypal reports as well).

  • Like 4
Link to comment
Share on other sites

  • 2 months later...

Please, someone can explain me how I can customize the style of the Stripe payment form? :)

I try to use the same class but doesn't work. I looking inside the module but not have find any css file. If the style come from Stripe how I can change it?
I see the Stripe doc, but I don't have understand well, the module works differente, there isn't one page with the form. or not? 

Thank you.

Link to comment
Share on other sites

2 minutes ago, MarcoPLY said:

Please, someone can explain me how I can customize the style of the Stripe payment form? :)

I try to use the same class but doesn't work. I looking inside the module but not have find any css file. If the style come from Stripe how I can change it?
I see the Stripe doc, but I don't have understand well, the module works differente, there isn't one page with the form. or not? 

Thank you.

? think you have to make the form yourself, no? or do you meand the Stripe button? not sure you can style much coming direct from Stripe.

Link to comment
Share on other sites

  • 1 month later...

Hi, If I add to Default currency: EUR  the form not show me the currency icon and during the payment give me beck an error of Invalid currency.

I using Padloper, if I set the currency in Padloper setting and left empty PaymentStripe this work well. But I need not set the currency in Padloper. so, I can anyway set currency in the Stripe module?

Thank you

 

Link to comment
Share on other sites

Hi @MarcoPLY.

I love this module and use it alot but find that it needs a lot of TLC after not having much activity over the last few years. I usually work on my own copy of it for different needs as my pull requests never get looked at. https://github.com/benbyford/PaymentStripe

My suggestion is to make a copy and work on the code yourself or pay someone to add the functionality you need. The currency options never worked for me either simply becuase it was never really implemented in the module (not sure about the paypal one as i never use it).

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

I try to install the PaymentInvoice after has deleted. When I upload the file via ftp or backend show up an server error 500 and all website is out, when I delete and go in error log I see this error: Error: Class 'PaymentModule' not found line 3

The line 3 is: class PaymentInvoice extends PaymentModule   All look correct, why I have this error ?

I have the last version of Padloper.  

 On localhost when I install the module also give me the error but if I delete the namespace ProcessWire; everything work well. In the live version this trick  doesn't work ?

Some one can give me some advice? 

 

 

 

 

Link to comment
Share on other sites

  • 8 months later...
  • 2 years later...
On 4/4/2021 at 8:58 AM, benbyf said:

i believe you'll need to implement the module in your templates as per the README https://github.com/apeisa/PaymentStripe/

I did. In the module's settings I put the Identity Token (generated in https://www.paypal.com/businessmanage/preferences/website as suggested by paypal.com) and tried with API endpoint https://api-m.sandbox.paypal.com (as suggested by paypal.com) and https://www.sandbox.paypal.com (as suggest by this module). I entered my paypal email address, default currency (EUR) and location (AT).
I put the code from the README file on the template and navigated to the page with that template plus get variable www.domain.tld?step=process

However:

if (! $response) {
throw new \ProcessWire\WireException("Couldn't get access into ");
}

is what I get.

Thoughts?
 

Link to comment
Share on other sites

  • 4 weeks later...

still no progress…

I don't see any place where to put the Client ID or the "Secret" or the Sandbox account email, just the Identity Token, the paypal email and the API endpoint. What am I missing?

Link to comment
Share on other sites

  • 1 month later...

I think I made a tiny progress, but still far from satisfying…

I get…

Notice: Undefined index: mc_gross in /home/.sites/66/site2760076/web/dev/site/assets/cache/FileCompiler/site/modules/PaymentPaypal/PaymentPaypal.module on line 87

I use the exact code as described in the github README example and set the get-variable ?step=process manually just to test. I'm not sure the above is even a big issue, but it's not working anyway, or hard to tell exactly. No sign of payment in my sandbox account anyway.

A couple of questions…

I set my paypal account to send IPN upon payment, does that even work here? I ask because it says:

'summary' => 'PaymentPaypal - using standard payment API and PDT for verification', 

so I wonder if those are the exclusive alternatives to IPN.

And then, why do I send an address to paypal? To my understanding, a user would pay with their paypal account in which they stored their address beforehand anyway, so why send it? Can paypal separate a shipping and a billing address? Because if not, then one could make an argument as to why that makes sense after all.

Next looking at the code from the github example and the module code itself, it's hard to tell where I am in the transaction with all that back and forth to and from paypal. Is data[mc_gross] missing in the array/object sent to paypal or coming from paypal? I guess it's the former. Still, would be great to have some more documentation because it's hard enough to work with paypal as it is.

Thanks for help!

Link to comment
Share on other sites

  • 11 months later...

Hi @apeisa

First of all, I thank the module. That was very useful to me.
I used it a few years ago without any problems. I have only reactivated at the same site (which still has Processwire 2.5.3) and have feedback that some users fall into the "else" condition of if ($payment->processPayment()) (the one that on the example returns "are you kidding me?").
I mean this is an exception that shouldn't happen... or am I wrong? What could be behind it?

Link to comment
Share on other sites

With the dashborad information from stripe, I saw that a number of payment attempts were rejected by the customer's bank for 'authentication_required'.
I think the secure payment method with the customer's authentication request is required.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...