Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Question - How to create order through REST API? #62

Open
MSidabras opened this issue Aug 16, 2018 · 2 comments
Open

Question - How to create order through REST API? #62

MSidabras opened this issue Aug 16, 2018 · 2 comments
Labels

Comments

@MSidabras
Copy link

No description provided.

@devqualwebs
Copy link

devqualwebs commented Sep 1, 2018

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.

@jaydalisay
Copy link

How did you pass the stripe_token through REST?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants