Issue in payment processing by using APIs

New Member
1 0 0

Hi

I have a shopify store and web application (php) in which I want to create an order with the payment process and get a runtime response of order complete with the payment process through my web application.

For this we used different methods available in shopify documentation but didn't get the proper response.
1- First, we try shopify "Buy Button" plugin by which order created successfully but it opens a new window for payments and i didn't get any run-time response for order creation or payment status.

2- Then we use Storefront API and follow this link "https://help.shopify.com/en/api/storefront-api/guides/checkout-guide#creating-the-checkout" and successfully created a checkout. 

For payment we also use 2 methods
1- "Shopify card vault" API with valid card information we got the following response "{"data":{"checkoutCompleteWithCreditCardV2":null},"errors":[{"message":"CheckoutCompleteWithCreditCardV2 access denied","locations":[{"line":3,"column":3}],"path":["checkoutCompleteWithCreditCardV2"]}]}.

2- Also, we try to use stripe with the help of this URL (https://help.shopify.com/en/api/guides/sales-channel-sdk/completing-a-payment#integrate-stripe-with-...) but for this, we need "shopify_payments_account_id" to send a request on stripe but we didn't get this parameter in the response of checkout.
CHECKOUT PROCESS BY USING Storefront API (graphql)
URL =https://{{ shop URL }}/api/2019-07/graphql.json
HEADERSArray ( [0] => Accept: application/json [1] => Content-Type: application/graphql [2] => X-Shopify-Storefront-Access-Token: {{ Access-Token }} )

RESPONSE = {"data":{"checkoutCreate":{"checkout":{"id":"Z2lkOi8vc2hvcGlmeS9DaGVja291dC8wMmYwMGI5ZWU5NTJiZjcwOWFjOGU5ZGFmYTY3NThiZD9rZXk9ZGY5OTllZDc5Mjk4OWYzMzg1MDA3NGYyMzllOTRiMWI=","webUrl":"https:\/\/{{ shop URL }}\/14675732\/checkouts\/02f00b9ee952bf709ac8e9dafa6758bd?key={{ key }}","lineItems":{"edges":[{"node":{"title":"Product title","quantity":1}}]}}}}}

 

As you see in the above response that checkout created successfully but we didn't get "shopify_payments_account_id" to complete the stripe payment process. Please let me know if we are on the right direction and what we do to complete our payment process.

Kindly guide us what we do.

0 Likes