cancel
Showing results for 
Search instead for 
Did you mean: 

How to capture paypal payments using sales order REST API magento 2?

How to capture paypal payments using sales order REST API magento 2?

How to create sales order with payment using REST api magento 2.

 

Order placed successfully with sales order api but payment is not set using order api.

I want to pass test credit card info in order to check how payment are capture using api.

 

Just test with VISA Test credit card details.

  • Credit card number 4111111111111111
  • Expiry Month year 01/20
> Payment method is payflowpro.

Request

http://{websiteurl}/index.php/rest/V1/orders/

I am using  `salesOrderRepositoryV1` API for place order using api from swagger sales order api request

 

Below is the structure of payment method in api,

"payment": {
"account_status": "string",
"additional_data": "string",
"additional_information": [
"string"
],
"address_status": "string",
"amount_authorized": 0,
"amount_canceled": 0,
"amount_ordered": 0,
"amount_paid": 0,
"amount_refunded": 0,
"anet_trans_method": "string",
"base_amount_authorized": 0,
"base_amount_canceled": 0,
"base_amount_ordered": 0,
"base_amount_paid": 0,
"base_amount_paid_online": 0,
"base_amount_refunded": 0,
"base_amount_refunded_online": 0,
"base_shipping_amount": 0,
"base_shipping_captured": 0,
"base_shipping_refunded": 0,
"cc_approval": "string",
"cc_avs_status": "string",
"cc_cid_status": "string",
"cc_debug_request_body": "string",
"cc_debug_response_body": "string",
"cc_debug_response_serialized": "string",
"cc_exp_month": "string",
"cc_exp_year": "string",
"cc_last4": "string",
"cc_number_enc": "string",
"cc_owner": "string",
"cc_secure_verify": "string",
"cc_ss_issue": "string",
"cc_ss_start_month": "string",
"cc_ss_start_year": "string",
"cc_status": "string",
"cc_status_description": "string",
"cc_trans_id": "string",
"cc_type": "string",
"echeck_account_name": "string",
"echeck_account_type": "string",
"echeck_bank_name": "string",
"echeck_routing_number": "string",
"echeck_type": "string",
"entity_id": 0,
"last_trans_id": "string",
"method": "string",
"parent_id": 0,
"po_number": "string",
"protection_eligibility": "string",
"quote_payment_id": 0,
"shipping_amount": 0,
"shipping_captured": 0,
"shipping_refunded": 0,
"extension_attributes": {
"vault_payment_token": {
"entity_id": 0,
"customer_id": 0,
"public_hash": "string",
"payment_method_code": "string",
"type": "string",
"created_at": "string",
"expires_at": "string",
"gateway_token": "string",
"token_details": "string",
"is_active": true,
"is_visible": true
}
}
}

How to set credit card info in above structure to place order using Paypal.

Any help would be appreciated.

 

If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial
2 REPLIES 2

Re: How to capture paypal payments using sales order REST API magento 2?

Hello Rakesh,

 

Have you get the solution for this? If yes , Please provide us step for it.

Re: How to capture paypal payments using sales order REST API magento 2?

@gequaldev  No, I can't able to find yet, how to pass live payment data in Rest API.

If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial