Download the PHP package kechankrisna/php_wing without Composer
On this page you can find all versions of the php package kechankrisna/php_wing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kechankrisna/php_wing
More information about kechankrisna/php_wing
Files in kechankrisna/php_wing
Package php_wing
Short Description Wing Bank online payment (Web SDK v2) client for PHP: authorize payments, open Wing's payment page, inquire transactions, and decrypt callbacks.
License MIT
Homepage https://github.com/kechankrisna/wing-onlinepayment/tree/main/php
Informations about the package php_wing
Wing Online Payment SDKs
Clients for Wing Bank's online payment API (Web SDK v2, spec 2.0.3) in several languages: authorize a payment, send the payer to Wing's payment page, confirm it with the inquiry API, and decrypt the callback Wing pushes after a successful payment.
| Folder | Package | Status |
|---|---|---|
dart/ |
dart_wing (pub.dev) |
1.0.0: authorization, inquiry, callback decryption, tested against the PHP known answers |
flutter/ |
flutter_wing_checkout (pub.dev) |
1.0.0: Wing's payment page in a web view, built on dart_wing 1.0.0 |
php/ |
kechankrisna/php_wing (Packagist) |
1.0.0: authorization, inquiry, callback decryption, tested against the PHP known answers |
kotlin/ |
io.github.kechankrisna:wing-onlinepayment (Maven Central) |
1.0.0: Kotlin/JVM, authorization, inquiry, callback decryption, tested against the PHP known answers |
node/ |
@kechankrisna/wing-onlinepayment (npm) |
1.0.0: authorization, inquiry, callback decryption, tested against the PHP known answers |
For ABA PayWay, see payway-checkout.
How a payment works
- Your server calls authorize with the order: the SDK encrypts the
payment into
payload(AES-256-CBC with your Wing password), signs it intohash, and Wing returns a token. - The payer opens
confirmUrl(Wing's payment page) and pays, in a browser, a web view (flutter_wing_checkout) or the Wing Bank app. - Wing redirects to your
return_urlwithstatus=success(or opens your app's deep link forMOBAPPpayments). - Your server calls inquiry and accepts the payment only if the amount
is at least your price (
isPaid(price)), as Wing requires. Wing can also POST the payment, encrypted, to a callback URL configured on its side: parseCallback decrypts it.
spec/ holds what every SDK must agree on: payloads, hashes and callbacks
computed with PHP's openssl_encrypt, the function of the PHP sample in
Wing's spec (spec/test-vectors/).
Tested against Wing
The Dart, PHP, Kotlin and Node.js SDKs pass their integration tests against
Wing's staging server (https://stage-pm2.wingbank.com): authorization
succeeds, and inquiry of an unknown order returns PG-I007 "Reference
number not found". flutter_wing_checkout opens Wing's real payment page in a web
view on macOS.
Where to run it
Call Wing from your server: the REST API key and the password are
secrets, and Wing checks the Referer header against the domain you
registered.
Repository layout
See CONTRIBUTING.md for tests and releases.
All versions of php_wing with dependencies
ext-json Version *
ext-openssl Version *
psr/clock Version ^1.0
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.1 || ^2.0
psr/log Version ^2.0 || ^3.0