killbill / killbill-cybersource-plugin

Plugin to use CyberSource as a gateway
http://killbill.io
Apache License 2.0
3 stars 15 forks source link

add soft descriptor support #7

Closed unieagle closed 8 years ago

unieagle commented 8 years ago

@sbrossie @pierre Please review, thanks!

unieagle commented 8 years ago

@pierre code updated.

pierre commented 8 years ago

General question: were you able to run the regression tests against the sandbox (rake test:remote:spec)?

unieagle commented 8 years ago

@pierre can not test via rake test:remote:spec, got:

Unsuccessful add_payment_method: {"exception_message":"wsse:InvalidSecurity: \nSecurity Data : illegal null input\n","payment_plugin_status":"CANCELED"}
unieagle commented 8 years ago

@pierre will improve this PR again once find a path to retrieve the card type in case there is only token available. May discuss with you next week.

pierre commented 8 years ago

@pierre can not test via rake test:remote:spec

It looks like you didn't configure your credentials (see the cybersource.yml).

find a path to retrieve the card type in case there is only token available

In case there is only a token available, your options are (as mentioned in my comment above):

  1. Look-up the plugin properties (does the API user triggering the payment know the card type and even though he is relying on the token, he passes the card type nonetheless as a hint)
  2. Look-up the cybersource_payment_methods entry (your original patch): when the card was tokenized, the card type was most likely known

There is a third option which is to retrieve the card type from CyberSource vault. This has some PCI implications though (and you probably don't need it).

unieagle commented 8 years ago

@pierre add some integration tests, now all the tests are green; made the change that only send soft descriptor when all the information is available, I think currently this is enough, since GDT will send full credit card information to KB, no cybersource token involved. The currently use case is that credit card information will stored in the billing_record_responses table, is this method good for this case? Thanks!

pierre commented 8 years ago

add some integration tests, now all the tests are green

👍

unieagle commented 8 years ago

@pierre code updated.

pierre commented 8 years ago

Thanks! 👍