Comments (6)
I use this validation scheme:
Expect::structure([
'amount' => Expect::type('float|int')->castTo('float')->required(),
'currency' => Expect::string()->required(),
'order_number' => Expect::type('string|int')->castTo('string')->required(),
'items' => Expect::arrayOf(Expect::structure([
'name' => Expect::string()->required(),
'amount' => Expect::type('int|float')->castTo('float')->required(),
'count' => Expect::int()->default(1),
'type' => Expect::string(),
'vat_rate' => Expect::int(),
])->castTo('array'))->castTo('array'),
'callback' => Expect::structure([
'return_url' => Expect::string()->required(),
'notify_url' => Expect::string()->required(),
])->castTo('array')->required(),
'payer' => Expect::structure([
'default_payment_instrument' => Expect::string()->required(),
'allowed_payment_instruments' => Expect::arrayOf(Expect::string()),
'contact' => Expect::structure([
'first_name' => Expect::string(),
'last_name' => Expect::string(),
'email' => Expect::string(),
'phone_number' => Expect::string(),
'city' => Expect::string(),
'street' => Expect::string(),
'postal_code' => Expect::string(),
'country_code' => Expect::string(),
])->castTo('array')->required(),
])->castTo('array')->required(),
'lang' => Expect::string()->pattern('[A-Z]{2}'),
'target' => Expect::structure([
'type' => Expect::string(),
'goid' => Expect::float(),
])->castTo('array'),
'order_description' => Expect::string(),
'additional_params' => Expect::arrayOf(Expect::structure([
'name' => Expect::string()->required(),
'value' => Expect::mixed(),
])->castTo('array'))->castTo('array'),
'eet' => Expect::structure([
'mena' => Expect::string(),
'celk_trzba' => Expect::float(),
'zakl_dan1' => Expect::float(),
'zakl_nepodl_dph' => Expect::float(),
'dan1' => Expect::float(),
'zakl_dan2' => Expect::float(),
'dan2' => Expect::float(),
'zakl_dan3' => Expect::float(),
'dan3' => Expect::float(),
'urceno_cerp_zuct' => Expect::float(),
'cerp_zuct' => Expect::float(),
])->castTo('array'),
'preauthorization' => Expect::bool(),
])->castTo('array')->otherItems();
from gopay-inline.
Yeah, being able to statically analysable the configuration would be great, but I'd rather add this to the new version of this package. Are you able to test #63 ?
from gopay-inline.
I implemented full Nette 3 support here with all features and codestyle refactoring: https://github.com/baraja-core/gopay-inline
from gopay-inline.
That's cool @janbarasek, could you please prepare a PR for Nette 3? Without formatting and other things?
from gopay-inline.
@f3l1x No, I implement my custom forked version.
from gopay-inline.
That does not make any sense. It would be much better to work on it together. We are willing to spend our time on it. Just think about it.
from gopay-inline.
Related Issues (20)
- EET je NULL
- vatRate a type je NULL u items při použití PaymentFactory
- Missing getAccountStatement() HOT 12
- Refundace platby pro EET
- EET účtenky platby HOT 3
- Missing BITCOIN PaymentInstrument HOT 5
- Wrong type used for price amounts HOT 8
- PHP 7.2 - 8.0 HOT 2
- Nette 3 support HOT 5
- Contributte
- Contributte style HOT 1
- RecurrentPayment configuration not compatible with Payment (callback parameter) HOT 6
- Contributte standardise HOT 2
- Payment price validation of an multi-item HOT 2
- How to create signature? HOT 2
- Auto update authorization token after expiration.
- Wrong installation instructions in README HOT 1
- Allow version 4 of moneyphp/money dependency HOT 6
- Added endpoint for cancel recurrence payment
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gopay-inline.