wpsharks / s2member

s2Member® Framework (membership management for WordPress®).
64 stars 36 forks source link

Invalid parameters to Stripe #425

Closed extremecarver closed 9 years ago

extremecarver commented 9 years ago

Please look here: https://wordpress.org/support/topic/show-country-adress-form-for-stripe-to-everyone?replies=3

extremecarver commented 9 years ago

Note this is clearly not a configuration fault on my part. As soon as I ditch the tax calculation part, the error is gone.

Why is tax calculation the way it is right now utter rubbish? It simply let's the user decide on a country. However clearly there needs to be 2 independant non conflicting pieces of evidence supporting the users location. So e.g. IP Adress and User country choice!

Also I do want to have tax - but not ADDED. Only Shown! So everyone pays the same, but depending on VAT rate, the tax charged for the invoice will be different! That's right now the safest way in the EU if there are problem with the regulations to show that if there is insufficient proof - that there was no motivation for the payer to cheat the system!

Well - Octabat does all of this and much more beautifully - BUT - s2member needs to show those fields to everyone AND pass them onwards. (well pass the IP onwards to if that is possible please).

extremecarver commented 9 years ago

Abbreviated log from Stripe: fingerprint: "*_C91VaemTolem" country: "DE" name: "_****" address_line1: null address_line2: null address_city: null address_state: null address_zip: null address_country: null cvc_check: "pass" address_line1_check: null address_zip_check: null dynamic_last4: null

(it goes through : is a new customer --> user updated --> Added a new visa ending in ...-->, but User was charged is not showing up in the events).

jaswrks commented 9 years ago

if I set up a global taxrate of e.g. 10% - then I get Invalid parameters to Stripe

Thanks for the report! I was able to reproduce this too. Taking a closer look.


Why is tax calculation the way it is right now utter rubbish? It simply let's the user decide on a country. However clearly there needs to be 2 independant non conflicting pieces of evidence supporting the users location. So e.g. IP Adress and User country choice!

I think the word "rubbish" is a bit harsh. If you're in the EU then obviously the VAT is something that you're very concerned about right now. Totally understandable that you're looking for ways to reach compliance. We're working on improvements in this area right now.

In the mean time, what you're referring to as "rubbish" has been adequate for most site owners up until just recently. There is a need for improvement now though (for EU merchants in particular); we recognize that :-)

I'm not going to discuss that any further in this issue, because there's an issue already open for that topic and it looks like you're subscribed to it already. Referencing: https://github.com/websharks/s2member/issues/395

extremecarver commented 9 years ago

Well, but passing on address_city: null address_state: null address_zip: null

Should be a very quick fix! We already ask the user about it if I e.g. enter BV=0.1% into the tax field (I will never have any customer from that basically not existing country - as noone lives their!).

So what can I quickly change to get those fields passed to Stripe... That's the quickest possible fix! (you will then only need to allow octabat.com to access the Stripe account - and you have a EU union VAT valid system)...

(well and if possible please also pass on the IP to Stripe - I don't really see how that would work though...

I'm posting in 10min a working VAT solution that cost me several Thousand Euros to get programmed. But it is only working for new checkouts using Paypal standard button so far. You can contact me if you want to integrate part of that into core - as well as debug some little things.

jaswrks commented 9 years ago

Next Release Changelog:

jaswrks commented 9 years ago

Well, but passing on address_city: null address_state: null address_zip: null

Thanks! Great point. I'm referencing your comment there in https://github.com/websharks/s2member/issues/395 where work is underway at this moment.

sowacharya commented 9 years ago

Please remove my name from this..I keep getting these messages On Dec 31, 2014 8:33 PM, "extremecarver (felix)" notifications@github.com wrote:

Well, but passing on address_city: null address_state: null address_zip: null

Should be a very quick fix! We already ask the user about it if I e.g. enter BV=0.1% into the tax field (I will never have any customer from that basically not existing country - as noone lives their!).

So what can I quickly change to get those fields passed to Stripe... That's the quickest possible fix! (you will then only need to allow octabat.com to access the Stripe account - and you have a EU union VAT valid system)...

(well and if possible please also pass on the IP to Stripe - I don't really see how that would work though...

I'm posting in 10min a working VAT solution that cost me several Thousand Euros to get programmed. But it is only working for new checkouts using Paypal standard button so far. You can contact me if you want to integrate part of that into core - as well as debug some little things.

— Reply to this email directly or view it on GitHub https://github.com/websharks/s2member/issues/425#issuecomment-68446601.

jaswrks commented 9 years ago

@extremecarver The "Invalid Parameters to Stripe" error was just resolved. A fix will go out in the next release for this. It's scheduled for release later this week. Thanks again for reporting that!

extremecarver commented 9 years ago

Could you please push that s2member Bugfix and the passing on update today ASAP?

Otherwise I have to shut down any new payments!!!! Or please provide a download to an intermediate version!

jaswrks commented 9 years ago

@extremecarver If you're looking for a quick fix, see: s2member-pro/includes/classes/gateways/stripe/stripe-utilities.inc.php at line 405.

Change:

return (integer)number_format($amount * 100, 0);

to

return (integer)number_format($amount * 100, 0, '.', '');
jaswrks commented 9 years ago

@sowacharya If you are receiving notices from GitHub, please log into your GitHub account and "Unwatch" the s2Member repo so that you don't get the notifications any more.

extremecarver commented 9 years ago

Sorry - does not solve it! (besides the line was before return (integer)($amount * 100);

What's wrong here? I assume you have several more changes in your version of that file!

jaswrks commented 9 years ago

That was the only change needed. However, it's possible there were other changes in the current dev branch that you don't have. Open a support ticket here and I'll send you a copy to beta test with :-) See: https://www.websharks-inc.com/support/?product=s2member&request_type=trouble_ticket ~ Otherwise the official release will be made available soon and you will get a notice in your Dashboard.

jaswrks commented 9 years ago

This fix went out with the release of s2Member v150102. http://www.s2member.com/changelog/#s2-changes-v150102