commercetools / commercetools-payment-integration-java

Module to handle payment transactions
Apache License 2.0
6 stars 4 forks source link

implement method provideCreatePaymentHandler #10

Closed MGA-dotSource closed 8 years ago

MGA-dotSource commented 8 years ago

method should return a function that can then be executed by the PaymentAdapterService

The method should be payment method specific (as needed).

It'll take a parameter that is a data holding wrapper object providing all possibly necessary information the shop could deliver.

It'll return a wrapper object containing

butenkor commented 8 years ago

customer is optional so if it is not provided you are going to fetch it with help of cart's customerId?

butenkor commented 8 years ago

current http request What exactly do you need besides user IP?

MGA-dotSource commented 8 years ago

@butenkor customer is optional cause it is basically not required to create a valid payment object as the cart has all needed data (names, addresses, etc.). This parameter is more something for the future as we're building an extensible and mostly generic framework. Maybe there'll be a PSP that needs a customer beeing logged in..

The HTTPRequestInfo (that's what the class is called now) provides possible information of IPv4 and IPv6 addresses and the requests locale. Header attributes could be taken into account as well, but are not yet supported. All this is not needed for Payone but maybe for any other PSP..

The whole architecture tries to provide as much data as possible to the PSP implementations to make sure adding a new one doesn't require changes within the common library.

MGA-dotSource commented 8 years ago

general method implementation is done Method specific stuff is done within issues #12 #13 #14