flori / wirecard_checkout_page

1 stars 5 forks source link

response.success? returns true even though it is not. #4

Open hsyn opened 9 years ago

hsyn commented 9 years ago

When i use shop_id as a parameter to initialise the gateway, i get a failure url in response params.

For example --> https://checkout.wirecard.com/page/D2004113D_DESKTOP/failureintermediate.php

Can it be that I am creating the gateway in a wrong way?

If i don't use the shop_id and use demo values instead, it works correctly.

With the latest version bump, I get an error if I pass "fingerprint_keys" key in the params too.

params = {
       fingerprint_keys: [
         'secret',
         'customerId',
         'shopId',
         'currency',
         'language',
         'paymentType',
         'orderDescription',
         'amount',
         'successURL',
         'cancelURL',
         'failureURL',
         'serviceURL',
         'confirmURL',
         'orderReference',
         'requestFingerprintOrder'
       ],
      currency:         'EUR',
      language:         'en',
      paymentType:       'CCARD',
      ....
response = gateway.init(params)
NoMethodError: undefined method `fingerprint_keys=' for #<WirecardCheckoutPage::InitRequest:0x007ff61b89d7f8>
    from lib/ruby/gems/2.1.0/gems/wirecard_checkout_page-0.1.0/lib/wirecard_checkout_page/request.rb:20:in `block in initialize'

Can you give an example setup how to initialise the gem in correct way?

flori commented 9 years ago

Hi hsyn,

you don't need to manually pass the fingerprint keys anymore, they're derived from the parameter DSL automatically. I have updated the README to reflect this change. Thanks for reporting this.

If you want to (need to?) use the shop_id you have to enable this feature via wirecard customer support. Then you can use the same account for different shops and can display a specifically designed payment form for each shop.

hsyn commented 9 years ago

Awesome! Thanks for clarifying :)

I actually was little bit confused when I read the Wirecard documentation about "test mode" and "demo mode". Do you know what is the difference?

I can make a successful demo purchase if i use the demo mode's secret and customer id. I hope it works as in demo mode when i put the real account credentials.

Btw, thanks for your work on this gem!

flori commented 9 years ago

Test mode allows some deeper testing of integration using a different customerId "D200411." The differences are described here:

Unlike demo mode, during test mode there is communication between your online shop and a test bank or demo bank provided for this purpose by the relevant financial service provider. However, the payment process is only simulated and no money is transferred.