crazymeeks / dragonpay Goto Github PK
View Code? Open in Web Editor NEWDragonpay payment gateway library in PHP
License: MIT License
Dragonpay payment gateway library in PHP
License: MIT License
Is there any function which can be use after successful payment???
Means if payment got successful then its should be redirect to some specific URL
I apologize if this is more of a request and not an issue but anyways I was using your code before and also procid was missing. I was hoping you'll include it in this release but did not. I was wondering why?
Here's an excerpt from Dragonpay PS doc for reference "to give user the capability to go straight to that channel without stopping by the Dragonpay payment selection page by passing a “procid” parameter".
ERROR MESSAGE: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
use Crazymeeks\Foundation\PaymentGateway\DragonPay\Action\CheckTransactionStatus;
When composer installing crazymeeks/dragonpay i get this error:
Failed to extract crazymeeks/dragonpay: (1) '/usr/bin/unzip' -qq '/my_project/vendor/composer/tmp-f372b4d619013ee3b508539762108611' -d '/my_project/vendor/composer/5913dd8c'
replace /my_project/vendor/composer/5913dd8c/crazymeeks-dragonpay-c992380/docs/build/doctrees/requirements.doctree? [y]es, [n]o, [A]ll, [N]one, [r]ename: NULL
(EOF or read error, treating as "[N]one" ...)
The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
Unzip with unzip command failed, falling back to ZipArchive class
Hello, I am trying to process cancelation but I recieved
Cancellation unsuccessful. Please contact Dragonpay.
I used this snippet
$merchant_account = [
'merchantid' => config('dragonpay.keys.merchantid'),
'password' => config('dragonpay.keys.password'),
];
$dragonpay = new Dragonpay($merchant_account);
try{
$dragonpay->action(new \Crazymeeks\Foundation\PaymentGateway\Dragonpay\Action\CancelTransaction($txnid));
}catch(\Crazymeeks\Foundation\Exceptions\Action\CancelTransactionException $e){
// log error
\Log::error($e->getMessage());
return false;
}
I'm using Laravel 6.* as my backend and vuejs axios for my frontend
I'm getting
Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/v1/subscription/payment/dragonpay' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
when I use SOAP/XML Web Service Model.
Below is my current code
$txnid = xxxxxxxx;
$merchant_account = [
'merchantid' => 'xxxx',
'password' => 'xxxx',
];
$dragonpay = new Dragonpay($merchant_account);
$status = $dragonpay->action(new CheckTransactionStatus($txnid));
dd(var_dump($status)); => returns "unknown"
We recently got an Invalid Token Error using the SOAP/XML method. But when we updated the production url from https://secure.dragonpay.ph to https://gw.dragonpay.ph, it started to work again. Dragonpay probably changed something in their side.
// Get token from Dragonpay
$token = $dragonpay->getToken($parameters);
// If $token instance of Crazymeeks\Foundation\PaymentGateway\Dragonpay\Token, then proceed
if ( $token instanceof Token ) {
try {
$dragonpay = $dragonpay->withProcid($request->payment_id)
->away();
} catch (PaymentException $e) {
return response()->json(['error' => $e->getMessage()]);
} catch (\Exception $e) {
return response()->json(['error' => $e->getMessage()]);
}
}
handlePostback is not retrieving data pass by the PS.
I'm using Laravel 6.* API for my back-end and Nuxtjs for my client-side
`public function dragonpayPaymentPostback()
{
$merchant_account = [
'merchantid' => getenv('DRAGONPAY_MERCHANT_ID'),
'password' => getenv('DRAGONPAY_MERCHANT_KEY')
];
$testing = getenv('DRAGONPAY_MERCHANT_SANDBOX');
$dragonpay = new Dragonpay($merchant_account, $testing);
$dragonpay->handlePostback(function ($data) {
// Save Transaction
});
}`
Hello. I'm using this package's version v3.2.4
and using Laravel version 6.13.1
.
While trying to test out the void/cancellation of pending payments, I found a possible bug.
Using the following code snippet:
$dragonpay = new Dragonpay($merchant_account);
try{
$dragonpay->action(new \Crazymeeks\Foundation\PaymentGateway\Dragonpay\Action\CancelTransaction($txnid));
}catch(\Crazymeeks\Foundation\Exceptions\Action\CancelTransactionException $e){
return false;
}
And noticed that even if I put anything in the $txnid
variable, it returns true
value.
Investigating further, the following condition starting at line 56 of src/Foundation/PaymentGateway/DragonPay/Action/CancelTransaction.php
file:
$result = parent::doAction($dragonpay, $curl);
if ($result == 0) {
return true;
}
throw new CancelTransactionException();
evaluates the $result == 0
to true
even if the $result
variable contains a webpage that shows the following:
This webpage is caused by an invalid URL for payment void/cancellation, as I have observed during URL building at line 51 of /src/Foundation/PaymentGateway/DragonPay/Action/BaseAction.php
file.
When I tried to check the $url
variable using dump and die function (dd()
), the generated URL shows the following:
https://test.dragonpay.ph/Pay.aspx/MerchantRequest.aspx?op=VOID&merchantid=XXXX&merchantpwd=XXXXXXXXXXX&txnid=XXXXXXXX
There seems to be an extra .../Pay.aspx/...
into the URL, which it shouldn't be there as per Dragonpay's documentation:
I tried removing the .../Pay.aspx/...
in the URL and was able to get a 0
(successful) value through the browser. The URL building seems to be reliant to the protected variable $baseUrl
.
Hoping this would be fixed soon!
EDIT: grammar
I'm getting these warnings whenever I will run composer:
Deprecation Notice: Class Crazymeeks\Foundation\Adapter\SoapClientAdapter located in D:/projects/taxheroes/vendor/crazymeeks/dragonpay/src\Adapter\SoapClientAdapter.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Crazymeeks\Foundation\PaymentGateway\Dragonpay\Action\ActionInterface located in D:/projects/taxheroes/vendor/crazymeeks/dragonpay/src\Foundation\PaymentGateway\DragonPay\Action\ActionInterface.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201
Hi. I have experience this error Error Class 'Crazymeeks\Foundation\PaymentGateway\Dragonpay\Action\CancelTransaction' not found this on my payment gateway class.
use Crazymeeks\Foundation\PaymentGateway\Dragonpay\Action\CancelTransaction;
// the property
private Dragonpay $dragonPay;
// the constructor
public function __construct()
{
$isSandBoxMode = true;
$this->dragonPay = new Dragonpay([
'merchantid' => "someValue",
'password' => "someValue",
], $isSandBoxMode);
}
// the method
public function cancelTransaction(string $txnid)
{
$this->dragonPay->action(new CancelTransaction($txnid));
}
Hi. I am planing to try this library for dragon pay integration but its show deprecated error. is this still okay to use?
Deprecation Notice: Class Crazymeeks\Foundation\PaymentGateway\Dragonpay\PaymentChannels located in ./vendor/crazymeeks/dragonpay/src/Foundation/PaymentGateway/DragonPay/PaymentChannels.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Crazymeeks\Foundation\PaymentGateway\Dragonpay\Action\ActionInterface located in ./vendor/crazymeeks/dragonpay/src/Foundation/PaymentGateway/DragonPay/Action/ActionInterface.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Crazymeeks\Foundation\PaymentGateway\Dragonpay\Action\CheckTransactionStatus located in ./vendor/crazymeeks/dragonpay/src/Foundation/PaymentGateway/DragonPay/Action/CheckTransactionStatus.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Crazymeeks\Foundation\PaymentGateway\Dragonpay\Action\BaseAction located in ./vendor/crazymeeks/dragonpay/src/Foundation/PaymentGateway/DragonPay/Action/BaseAction.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Crazymeeks\Foundation\PaymentGateway\Dragonpay\Action\CancelTransaction located in ./vendor/crazymeeks/dragonpay/src/Foundation/PaymentGateway/DragonPay/Action/CancelTransaction.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Crazymeeks\Foundation\PaymentGateway\Dragonpay\Token located in ./vendor/crazymeeks/dragonpay/src/Foundation/PaymentGateway/DragonPay/Token.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Hello.
I'm using v3.2.4 of this package.
Trying to test out your package, and I noticed when I try the tokenized URL method on post-checkout, the description is getting malformed, spaces are transforming into plus signs and special characters turning into gibberish.
Scrutinizing into the package's code, I found out that the description
parameter is getting URL-encoded? Compared to non-tokenized URL, the description is not being URL-encoded.
Screenshot when using tokenized URL with BogusBank and passing the value José Rizal
into description
:
The line 166 at src/Foundation/PaymentGateway/Parameters.php
file might be the cause?
Or there might be a reason why we need to URL-encode the description
when using tokenized URLs?
Hoping for your positive feedback!
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.