onpayio / php-sdk Goto Github PK
View Code? Open in Web Editor NEWPHP-SDK For integrating with OnPay.io
License: MIT License
PHP-SDK For integrating with OnPay.io
License: MIT License
Hey,
I want to use windows/checkout method of onPay.
I need to use that in Bagisto. However, I am confused that if I want to use the Windows method, do I still need to install the package? or can I just put the form provided by onPay for windows method and everything will be handled automatically?
Because, if that form is enough to redirect and then the user can perform payment there, then I don't think there is any need to install onPay in my project, right?
It is possible to send in an invalid gateway_id in the constructor, which results in an invalid authorize URL when attempting the OAUTH2 flow.
It should be restricted to only allow numeric values.
In 1.0.6 or 1.0.7 \OnPay\OnPayAPI now throws an exception if gateway_id is blank or 0. This was not the case in 1.0.5.
We have fixed the dependency local, but backwards incompatible changes should only be introduced in major versions, not patch or minor updates.
https://github.com/onpayio/php-sdk/blob/master/src/API/PaymentWindow.php#L310
Info fields are being merged into the fields array throughout the loop. This shouldn't be necessary.
I can only use the code once. It is like the token never get refreshed.
HasCardholderData is being populated with the cardholder data, which is wrong.
How to handle a multi language shop (eg. Danish / English)?
Payment window language appears to be locked by the "Payment window language" setting in the back office.
It would be more appropriate that language in the payment window was determined by the current language in the front office so that it follows the language chosen by the customer.
While reading through the phpdoc for TransactionService
I noticed several functions such as captureTransaction
, cancelTransaction
and refundTransaction
are stated to throw \GuzzleHttp\Exception\GuzzleException
. This is incorrect since they all call OnPayAPI's post method which throws ApiException
, TokenException
and ConnectionException
.
Hi,
I am using onPay redirection inside Bagisto eCommerce (Laravel PHP) project.
I using a form and passing all the mandatory input fields to the https://www.onpay.io/window/v3/.
However, when the redirection happens, it gives me error:
Invalid input
The input data was invalid.
Invalid gateway id or HMAC
Also, in the Console tab, I see the following error:
Unrecognized Content-Security-Policy directive 'reflected-xss'.
Are they relatable? How can I confirm that my input data is correct? There seem no way to check if the HMAC is correct and I can assure that the gatway id is correct.
Would be nice to be able to define a custom PSR-7 HTTP Client to the OnPayAPI class (In order to use Guzzle and not fkooman CurlHttpClient)
It is not possible to translate the text "Pay with credit card", which appears during payment at checkout.
Would be nice to be able to define a LoggerInterface to the OnPayAPI client
I'd love the possibility to be able to use the API token from the OnPay dashboard as a way of communicating with the API via the SDK instead of having to deal with OAuth.
$onPayAPI = new \OnPay\OnPayAPI($tokenStorage, [
'client_id' => 'example.com', // It is recommended to set it to the domain name the integration resides on
'redirect_uri' => 'http://localhost/onpay-php-sdk/example2.php?auth',
'gateway_id' => '1234', // Should be set to the gateway id you are integrating with
]);
There could be an option to switch from OAuth to Bearer tokens in the above code for example.
I'll use the Guzzle client for now as a workaround :)
When encountering a TokenException, because of mismatch in provided client_id to OnPayAPI constructor, and client_id/provider_id defined in stored token, a more detailed description of what is wrong would be nice.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.