Comments (9)
anyone?
from django-oscar-api.
{
"basket": "http://testserver/oscarapi/baskets/1/",
"total": "100.0",
"shipping_charge": {
"currency": "EUR",
"excl_tax": "10.0",
"tax": "0.6"
},
"shipping_method_code": "no-shipping-required",
"shipping_address": {
"country": "http://127.0.0.1:8000/oscarapi/countries/NL/",
"first_name": "Henk",
"last_name": "Van den Heuvel",
"line1": "Roemerlaan 44",
"line2": "",
"line3": "",
"line4": "Kroekingen",
"notes": "Niet STUK MAKEN OK!!!!",
"phone_number": "+31 26 370 4887",
"postcode": "7777KK",
"state": "Gerendrecht",
"title": "Mr"
}
}
from django-oscar-api.
@michaelkook thanks much gonna try it out later on
from django-oscar-api.
@michaelkook i tried but currently i keep getting
Post Response -{"detail": "You do not have permission to perform this action."} code - 403
currently working using java, my code if it makes any difference
`String json = this.get(this.ordersUrl, "Get Orders");
System.out.println(json);
JSONArray jarr = new JSONArray(json);
String basket = jarr.getJSONObject(0).getString("basket");
String total = jarr.getJSONObject(0).getString("total_incl_tax");
String shipping_method_code = jarr.getJSONObject(0).getString("shipping_code");
JSONObject shipping_address = jarr.getJSONObject(0).getJSONObject("shipping_address");
List<NameValuePair> urlParameters = new ArrayList<>();
urlParameters.add(new BasicNameValuePair("basket", basket));
urlParameters.add(new BasicNameValuePair("total", total));
urlParameters.add(new BasicNameValuePair("shipping_code", shipping_method_code));
urlParameters.add(new BasicNameValuePair("shipping_address", shipping_address.toString()));
Response res = this.post(this.checkoutUrl, urlParameters, "Checkout!!");
System.out.println("code - "+ Integer.toString(res.code));
System.out.println("Response - " + res.response);`
from django-oscar-api.
I think that the question about the structure of the checkout request was properly answered by @michaelkook right?
from django-oscar-api.
Well it didn't solve my issue. i atill have the issue with
`Post Response -{"detail": "You do not have permission to perform this action."} code - 403
On Nov 16, 2015 5:44 AM, "Lars van de Kerkhof" [email protected]
wrote:
I think that the question about the structure of the checkout request was
properly answered by @michaelkook https://github.com/michaelkook right?—
Reply to this email directly or view it on GitHub
#31 (comment)
.
from django-oscar-api.
ok, but are you sending any authentication information along with that request? And are you sending csrf headers properly?
from django-oscar-api.
@glenfordwilliams Until now you could only checkout when logged in. Today we merged #49 so it's possible to do a anonymous checkout (when you set the guest_email
property). Can you test this?
from django-oscar-api.
Check out the latest version of oscar-api. If this is still a problem please reopen this issue
from django-oscar-api.
Related Issues (20)
- Unable to create an account HOT 1
- How to Login with react js HOT 16
- How to Overwrite Oscar API URL ? HOT 1
- getting HOT 2
- Weird results in attributes with patching Childs HOT 3
- AttributeError: 'NoneType' object has no attribute 'strategy' HOT 3
- Is there any good way to make price range filter with oscar api? HOT 1
- Why doesn't ProductList filter out non-public products?
- AdminProductSerializer validation
- `cookies_to_delete` is always an empty list HOT 12
- AdminProductSerializer error when trying to add products HOT 1
- Voucher discount is applied to every single product in the basket
- Add to basket api returns 403 forbidden when user is logged in HOT 5
- ImproperlyConfigured at /api/admin/products/ when a Product has an optiongroup HOT 13
- master ahead of main? HOT 1
- _ in both ApiBasketMiddleWare and translations? HOT 1
- Potential problem with basket for unauthenticated users
- Inconsistency between product class and product category HOT 1
- PUT on productclasses HOT 6
- Empty attribute values cause an exception
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 django-oscar-api.