Comments (6)
Could you please post your models, configs and etc
from payumlaravelpackage.
Hello Makasim,
This is my config.php
<?php
use Payum\Core\Storage\FilesystemStorage;
use Buzz\Client\Curl;
use Payum\Paypal\ProCheckout\Nvp\PaymentFactory as PaypalProPaymentFactory;
use Payum\Paypal\ProCheckout\Nvp\Api as PaypalProApi;
$detailsClass = 'Payum\Core\Model\ArrayObject';
$tokenClass = 'Payum\Core\Model\Token';
$payments['paypal-pro'] = PaypalProPaymentFactory::create(new PaypalProApi(
new Curl,
array(
'username' => 'xxxxx',
'password' => 'xxxxx',
'partner' => 'xxxxx',
'vendor' => 'xxxxx',
'sandbox' => true
)
));
return array(
// You can pass on object or a service id from container.
'token_storage' => new FilesystemStorage(__DIR__.'/../../../../../storage/payments', $tokenClass, 'hash'),
'payments' => $payments,
'storages' => array(
$detailsClass => new FilesystemStorage(__DIR__.'/../../../../../storage/payments', $detailsClass),
)
);
My PaypalController where I still have stub payment data
<?php namespace DeansHomer\Controllers;
// app/controllers/PaypalController.php
use Payum\Core\Security\SensitiveValue;
use \Redirect;
use \Log;
class PaypalController extends BaseController
{
public function prepareCheckout()
{
$storage = \App::make('payum')->getStorage('Payum\Core\Model\ArrayObject');
$paymentDetails = $storage->createModel();
$paymentDetails['CURRENCY'] = 'USD';
$paymentDetails['AMT'] = '0.01';
$paymentDetails['ACCT'] = '5105105105105100';
$paymentDetails['EXPDATE'] = '1214';
$paymentDetails['CVV2'] = '123';
$paymentDetails['billtofirstname'] = 'MyFirstName';
$paymentDetails['billtolastname'] = 'Test';
$paymentDetails['billtostreet'] = '123 Main St.';
$paymentDetails['billtocity'] = 'San Jose';
$paymentDetails['billtostate'] = 'CA';
$paymentDetails['billtozip'] = '95101';
$paymentDetails['billtocountry'] = 'US';
$storage->updateModel($paymentDetails);
$captureToken = \App::make('payum.security.token_factory')->createCaptureToken('paypal-pro', $paymentDetails, 'csi/payment_done');
// return $captureToken->getTargetUrl();
return Redirect::to($captureToken->getTargetUrl());
}
}
And the payment_done controller
<?php namespace DeansHomer\Controllers;
use Payum\Core\Registry\RegistryInterface;
use Payum\Core\Request\GetHumanStatus;
use Payum\Core\Security\HttpRequestVerifierInterface;
use Symfony\Component\HttpFoundation\Request;
use \Input;
use \Log;
class PaymentController extends BaseController
{
public function done()
{
$payum_token = urldecode(Input::get('payum_token'));
/** @var Request $request */
$request = \App::make('request');
$request->attributes->set('payum_token', $payum_token);
$token = $this->getHttpRequestVerifier()->verify($request);
$payment = $this->getPayum()->getPayment($token->getPaymentName());
$status = new GetHumanStatus($token);
$payment->execute($status);
return \Response::json(array(
'status' => $status->getStatus(),
'details' => iterator_to_array($status->getModel())
));
}
from payumlaravelpackage.
I cannot find any bugs, everything looks correct.
from payumlaravelpackage.
there was a bug in the lib, again. Fixed it Payum/Payum@0507dea
I am going to tag this now
from payumlaravelpackage.
has to fixed in: https://github.com/Payum/Payum/releases/tag/0.11.2 and https://github.com/Payum/PaypalProCheckoutNvp/releases/tag/0.11.2
from payumlaravelpackage.
I got the error:
Request GetHumanStatus{model: ArrayObject} is not supported. while using the Sofort payment method
from payumlaravelpackage.
Related Issues (20)
- Any plans to support Moneris?
- Composer install fails laravel 5.1 HOT 4
- ReflectionException in Container.php line 737: Class payum does not exist HOT 12
- Does this package support laravel 5.2? HOT 3
- Getting 0 as hash for the targetUrl HOT 7
- Class payum does not exist HOT 1
- Why Using Core version 1.0.0 HOT 2
- Request Cancel{model: ArrayObject} is not supported HOT 2
- GetHumanStatus{model: ArrayObject} is not supported HOT 6
- Trait 'Payum\Core\GatewayAwareTrait' not found HOT 13
- Is this Compatible with latest laravel? 5.2 or 5.3? HOT 4
- Request GetHumanStatus{model: ArrayObject} is not supported. HOT 1
- Payum/PayumLaravelPackage paypal express checkout capture route not working
- Is this a active branch and compatible with latest laravel? 5.7 or 5.8?
- Missing decimal point in amount when using EloquentStorage and OmnipayBridge
- Request Refund{model: ArrayObject} is not supported. Make sure the gateway supports the requests and there is an action which supports this request (The method returns true). There may be a bug, so look for a related issue on the issue tracker. HOT 1
- Subscription defined by a start and end date.
- Notify Controller doUnsafeAction doesn't resolve gateway name parameter
- Configuration from a database?
- Not installing, Laravel Container issue HOT 2
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 payumlaravelpackage.