ghidinelli / cfpayment

ColdFusion payment processing library makes plumbing e-commerce apps easy. Charging credit cards has never been easier. Inspired by Ruby's ActiveMerchant.
Other
90 stars 54 forks source link

Treat "SuccessWithWarning" as a successful charge. #12

Closed perdjurner closed 8 years ago

perdjurner commented 9 years ago

Without this code change cfpayment will return false for getSuccess() even though the credit card was charged successfully through PayPal (nvp).

ghidinelli commented 9 years ago

Per - thanks! Any chance you could add a test to the that shows it work for both scenarios? https://github.com/ghidinelli/cfpayment/blob/master/api/gateway/paypal/wpp/tests/NVPGatewayTest.cfc

perdjurner commented 9 years ago

Sure, I'll try and get that done soon.

perdjurner commented 8 years ago

It's been a while...

There seems to be more to that "successWithWarning" response than I first thought.

I think it may not always mean that the payment went through after all. It depends on how you have configured PayPal's fraud management filter.

So, I'm going to close this PR since I'm not sure how to best deal with this in the context of this library.

ghidinelli commented 8 years ago

Thanks for following up Per - you might consider treating this like an AVS or CVV response where you have the option of following up and declining the charge if you don't like the response. I would do that outside the library though as that's really part of your application code. Imagine something like:

if (status = success)
  // normal processing
elseif (status = successwithwarning)
  // void/refund the charge and warn the user
/if
perdjurner commented 8 years ago

Thanks Brian :)