Coder Social home page Coder Social logo

zhutik / adyen-api-go Goto Github PK

View Code? Open in Web Editor NEW
22.0 2.0 12.0 240 KB

[Deprecated] Adyen API Library for GO

Home Page: https://godoc.org/github.com/zhutik/adyen-api-go

License: MIT License

Go 99.84% Makefile 0.16%
adyen golang go adyen-api golang-library golang-package

adyen-api-go's People

Contributors

codingconcepts avatar emirb avatar hfajunakaliantiga avatar lbailly avatar seklfreak avatar sywesk avatar zhutik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

adyen-api-go's Issues

Add credentials class support

Add credentials class support

Move API credentials logic into separate structure and update Adyen base class to process new credentials

Live URLs need additional parts

Hey mate,

Just reading through the page on live endpoints (https://docs.adyen.com/developers/api-reference/live-endpoints) and think we'll probably need to add in the [random] and [company name] parts into the live URLs...

I'm not sure whether the hpp/cse and hpp URLs need these parts, perhaps you know?

var Production = Environment{
	Name:      EnvironmentProduction,
	apiURL:    "https://%s-%s-pal-live.adyen.com/pal/servlet",
	clientURL: "https://%s-%s-live.adyen.com/hpp/cse/js/",
	hppURL:    "https://%s-%s-live.adyen.com/hpp/",
}

I propose we either add these as parameters to the ParseEnvironment function, or create a MakeEnvironment function, what do you think?

Let currency be configured

EUR is hardcoded right now, let Adyen be configured with currency setting.
Also, introduce default currency setting, so it will fallback to default, if configuration is not specified

AdditionalData for request does not have enough fields.

From the Adyen docs, you can see that there are many different bits of information that can come back in a payment response: https://docs.adyen.com/developers/api-reference/payments-api#paymentresultadditionaldata.

In the AdditionalData of this library, there are only three assignable fields (because A) the input AdditionalData only supports a narrow subset of behaviour and B) the AdditionalData request struct is being reused for the response.

Adding risk data params to the AdditionalData struct

Hello, ( and thanks for your work ! )

We need to add risk datas parameters to our request ( description available here : https://docs.adyen.com/developers/api-reference/payments-api/paymentrequest/paymentrequest-additionaldata )

For our use, we we would need:

  • Two fields:
    • riskdata.shopperCountry and
    • riskdata.browserLanguage ( on a new struct RiskData ? )

and

  • Params exposed on "Basket content fields" part:
    • riskdata.basket.item ( itemID, productTitle, amountPerItem etc .... )

I made a "quick dirty" test, mapping the fields like this on current "AdditionnalData" struct:

RiskDataItemProductTitle string json:"riskdata.basket.item.productTitle,omitempty"
RiskDataItemCategory string json:"riskdata.basket.item.category,omitempty"
RiskDataItemSize int json:"riskdata.basket.item.size,omitempty"

It seems to work as I see the information on Adyen backOffice,

But what I don't uderstand is how to map/generate "itemNr" required by adyen for each item, if you have any idea your help should be welcome to purpose a struct for our need,

Kind regards,
Thanks in advance,
JP

Simplify library initialization parameters

Remove Merchant Account and HPP configs from API initialization

To simplify library initialization, Merchant Account and HPP SkinCode need to be removed from the configuration and used only in specific requests.

Solution:

  • MerchantAccount should be specified in request structures
  • SkinCode should be specified in request structures
  • ShopperLocale should be specified in request structures
  • HMAC should be part of configuration as optional
  • ClientID should be parameter for ClientURL method

Combine Authorise, AuthoriseEncrypted and Authorise3D structures

Currently, all Authorise, AuthoriseEncrypted and Authorise3D structures are used, but they are 95% identical.

AuthoriseEncrypted will be removed, "additionalData" field will be added to Authorise structure.
AuthoriseEncrypted method is Payment Gateway will be removed.
Authorise3D structure will be removed
Authorise3D method will be removed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.