GithubHelp home page GithubHelp logo

checkout help about django-oscar-api HOT 9 CLOSED

django-oscar avatar django-oscar commented on June 5, 2024
checkout help

from django-oscar-api.

Comments (9)

kingwill101 avatar kingwill101 commented on June 5, 2024

anyone?

from django-oscar-api.

michaelkook avatar michaelkook commented on June 5, 2024

{
"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.

kingwill101 avatar kingwill101 commented on June 5, 2024

@michaelkook thanks much gonna try it out later on

from django-oscar-api.

kingwill101 avatar kingwill101 commented on June 5, 2024

@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.

specialunderwear avatar specialunderwear commented on June 5, 2024

I think that the question about the structure of the checkout request was properly answered by @michaelkook right?

from django-oscar-api.

kingwill101 avatar kingwill101 commented on June 5, 2024

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.

specialunderwear avatar specialunderwear commented on June 5, 2024

ok, but are you sending any authentication information along with that request? And are you sending csrf headers properly?

from django-oscar-api.

maerteijn avatar maerteijn commented on June 5, 2024

@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.

maerteijn avatar maerteijn commented on June 5, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.