Giter Site home page Giter Site logo

Comments (2)

devqualwebs avatar devqualwebs commented on June 30, 2024

Hello,
I'm trying to place an order from saved card using REST API. I've successfully placed order for guest customer. For that we've to pass stripe_token , last 4 digit, exp. month & year. And Order are placing successfully.

But I'm not getting how to place order using saved card. and what data is need to pass in magento 2 REST API to place an order using saved card.

The way I'm using stripe payment for guest customer is like -
Passing card data to stripe API , getting stripe token and then pass this token to magento 2 API. Here is an example.

<?php $data = array ( 'paymentMethod' => array( 'method' => 'pmclain_stripe', 'additional_data' => array( 'cc_cid' => '', 'cc_ss_start_month' => '', 'cc_ss_start_year' => '', 'cc_ss_issue' => '', 'cc_type' => Visa, 'cc_exp_year' => 21, 'cc_exp_month' => 12, 'cc_number' => '4111111111111111', 'cc_last4' => '1111', 'cc_token' => 'token_from_stripe', ), ), 'billing_address' => array ( 'email' => 'email', 'region' => 'state', 'regionId'=>'region_id', 'telephone'=> 'telephone', 'country_id' => 'country', 'street' => array ( 0 => 'address', 1 => 'addressline2' ), 'postcode' => 'postcode', 'city' => 'city', 'firstname' => 'firstname', 'lastname' => 'lastname' ), 'email' => 'email' ); $paymentInfo = 'https://mymagentourl.com/index.php/rest/default/V1/carts/mine/payment-information'; ?>
But I'm not getting what data need to pass for saved card method.

Please help me to do this.

from module-stripe.

jaydalisay avatar jaydalisay commented on June 30, 2024

How did you pass the stripe_token through REST?

from module-stripe.

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.