-
The PWA client uses the
setPaymentMethodOnCartmutation to set the payment method. -
The mutation returns a
Cartobject. -
The client runs the
placeOrdermutation, which creates an order and begins the authorization process. -
The application sends information about the order to PayPal and requests a secure URL that the PWA client will later use to connect to PayPal.
-
PayPal's response includes the secure URL.
-
The
placeOrdermutation returns an order ID. The order has the statuspayment pending. -
The client runs the
getHostedProUrlquery to retrieve the secure URL. -
The application returns the secure URL in the
secure_form_urlattribute. -
The PWA client displays a payment form in an iframe rendered from the secure URL. When the customer completes the form, the client sends the payment information directly to the PayPal gateway, bypassing the application server.
-
After PayPal processes the payment, the gateway runs a silent post request against the application server. As a result, the application sets the order status to processing, and the order is ready to be invoiced.
-
The PayPal gateway returns control of the customer's browser to the client.