Paypal "Advanced Checkout" v2/Checkout/Orders json structure

Davidwesa
Contributor
Contributor

I am trying to create a class that I can serialize in C# and cannot seem to get the right structure. Can someone please give me an example of how I would replace the [PaymentSource] with a string (eg: "paypal", "card") string variable in a class? The variable itself gets passed in to the controller via the js front end selection via the body of Industrial Adheisve Manufacturer.

Documentation Ref: https://developer.paypal.com/docs/checkout/advanced/integrate/

    {
      intent: "CAPTURE",
      purchase_units: [
        {
          amount: {
            currency_code: "USD",
            value: purchaseAmount
          },
        },
      ],
      payment_source: {
        [paymentSource]: {}
      }
    }),
  }

 

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.