Giter Club home page Giter Club logo

paybox-direct's People

Contributors

byidi avatar greg0ire avatar soullivaneuh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

paybox-direct's Issues

NUMQUESTION should be validated

Hello

Paybox' doc says that SITE, RANG and NUMQUESTION are always returned unchanged in the response, and their values must be the same than in the request.

Quote (sorry, french):

Les variables SITE, RANG et NUMQUESTION sont toujours répétées identiques à l’appel afin
de bien identifier à quoi correspond la question. Ces valeurs devront être contrôlées
systématiquement.

Source, page 12 : https://www.paybox.com/wp-content/uploads/2021/10/ManuelIntegrationVerifone_PayboxDirect_V8.2_FR.pdf

I suggest to introduce that check in order to consider a response valid or not.
Actually, this check is not possible outside the library, because the generated questionNumber is private and incremented after each request.

Provide autowiring

  [Symfony\Component\DependencyInjection\Exception\RuntimeException]                                                                                                                                                                                                       
  Cannot autowire service "AppBundle\Manager\CreditCardManager": argument "$paybox" of method "__construct()" references class "Nexy\PayboxDirect\Paybox" but no such service exists. You should maybe alias this class to the existing "nexy_paybox_direct.sdk" service.  

Review php version

The readme states 5.6 but composer says 7.4

Is 7.4 really needed or would it work fine on any 7.x?

Would expect backwards compatability to be possible with the right combination of dependency versions.
Or if not would you be open to me building a branch with full 7.x support?

Test DEVISE parameter

On documentation, it says that DEVISE is mandatory for some operation.

But if we try without this parameter (example: authorize), this works.

Test:

  • What happen on BO without the parameter
  • What happen if we send the same as the default one
  • What happen if we send a different one (e.g. dollar)

Provide the response in exceptions when applicable

If would be nice to be able to see the response object when an exception is displayed. Not sure if it should be part of the message or rather be a property of the exception, and have this property be nicely displayed by some framework integration class.

When logging the exception, this property should be added to the $context argument.

Add children classes to PayboxException

Affected people are probably not the same depending on the origin of the exception.

  • It the exception comes from the merchant, developers are affected, because the code probably needs to be changed
  • If the exception comes from the gateway, the application should display a 502 or maybe a 503, beacuse it is probably an outage from paybox
  • If the exception comes from the bank, the financial department probably needs to be aware of that.

Likewise, error in code and validation problems should be segregated. Ideally validation problems should only happen on the merchant side, but it could happen further down the chain in case of suspicious activity of the cardholder, for example.

Here is how I organised that:

Exception
├── Error
│   ├── BankErrorException.php
│   ├── GatewayErrorException.php
│   └── MerchantErrorException.php
├── ErrorException.php
├── Validation
│   ├── BankValidationException.php
│   ├── GatewayValidationException.php
│   └── MerchantValidationException.php
├── ValidationException.php
├── Wallet
│   └── CardNotFoundException.php
└── WalletException.php

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.