Comments (6)
from sumup-ecom-php-sdk.
Hi @rleo79,
There is nothing wrong with your code. You are missing the payments
scope. You can read more about the restricted scopes here. You should write to [email protected] to be properly onboarded for this functionality.
from sumup-ecom-php-sdk.
what does " You should write to [email protected] to be properly onboarded for this functionality." mean? Is there anything to be activated in the account as well? I am having that issue on test- and real accounts
from sumup-ecom-php-sdk.
try {
$sumup = new \SumUp\SumUp([
'app_id' => env('SUM_UP_APP_ID'),
'app_secret' => env('SUM_UP_APP_SECRET'),
'grant_type' => 'client_credentials',
'scopes' => ['payments', 'transactions.history', 'user.app-settings', 'user.profile_readonly'],
]);
$checkoutService = $sumup->getCheckoutService();
// $checkoutResponse = $checkoutService->create($amount, $currency, $checkoutRef, $payToEmail);
// $checkoutId = $checkoutResponse->getBody()->id;
$success = [
'message' => 'Get Sum Up Auth.',
'success' =>true,
'data' => $checkoutService
];
// pass the $chekoutId to the front-end to be processed
} catch (\SumUp\Exceptions\SumUpAuthenticationException $e) {
$success = [
'message' => 'Authentication error: ' . $e->getMessage(),
'success' =>false,
];
} catch (\SumUp\Exceptions\SumUpResponseException $e) {
$success = [
'message' => 'Response error: ' . $e->getMessage(),
'success' =>false,
];
} catch(\SumUp\Exceptions\SumUpSDKException $e) {
$success = [
'message' => 'SumUp SDK error: ' . $e->getMessage(),
'success' =>false,
];
}
This is my Rest-api code, I'm try to integrate Sum-up Online payment Integration in my Laravel project, but I'm getting error like this
{
"message": "Response error: Client error",
"success": false
}
So, Anyone can give me suggestion for how to fix this issue.
from sumup-ecom-php-sdk.
Hello everyone,
I got the same issue, and i have added payments scope in my code.
Please check and give me suggestion, how to fix this issue.
$sumup = new \SumUp\SumUp([
'app_id' => 'SUM_UP_APP_ID',
'app_secret' => 'SUM_UP_APP_SECRET',
'grant_type' => 'client_credentials',
'scopes' => ['payments', 'transactions.history', 'user.app-settings', 'user.profile_readonly'],
]);
$checkoutService = $sumup->getCheckoutService();
$checkoutResponse = $checkoutService->create($amount, $currency, $checkoutRef, $payToEmail);
$checkoutId = $checkoutResponse->getBody()->id;
Thanks in Advance.
from sumup-ecom-php-sdk.
from sumup-ecom-php-sdk.
Related Issues (20)
- getting 403 error in checkout api HOT 4
- error compsoser HOT 3
- How to create YOUR-AUTHORIZATION-CODE HOT 1
- Missing support of create checkout with merchant_code HOT 1
- SumUp integration in Php using Api's HOT 1
- Documentation Typo
- Response error: request_not_allowed. Error 403 on Payment HOT 1
- Fatal error: Class 'SumUp\SumUp' not found in
- Make a webhook
- How to get payment gateway methods list of merchant account using sumUp apis HOT 1
- SumUp SDK error: Internal Server Error (3imsx1wj4pebs) HOT 1
- What should I do after getting the checkoutResponse??? HOT 3
- Most transactions fails when using sdk or REST API v0.2 HOT 2
- Error if wrong grant_type HOT 1
- JS console deprecation warning
- SSL Certificate problem HOT 1
- $returnURL sometimes called twice by SumUp
- Wy i have response 400 ? HOT 2
- Update Checkout creation to use merchant_code instead of pay_to_email
- Change amount dynamically problem
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 sumup-ecom-php-sdk.