locked
integration of API in an earlier version of razor syntax WebAPP RRS feed

  • Question

  • User-1753299103 posted

    Hi,

    I originally learned  razor syntax via Microsoft webmatrix and used it to design my web App and I never switched it over to MVC. My directory only has an APP_CODE folder.

    Recently I have been faced to integrate some API for certain usages in my web APP. They have been presenting me with such APIs as:

    1Request Example: https://pay.alphapay.ca/api/v1.0/web_gateway/partners/ZZZ6/orders/ZZZ620200303133409?time=1583273723299&nonce_str=123&sign=c3884addcc5a1615e8c9c1181f74b5793aef8de19385726918a54c2c3b0b051c

    2. Request JSON:  

    {
          "description""DEVELOPER TEST",
          "price"1,
          "currency""CAD",
          "channel""Alipay",
          "notify_url""www.alphapay.com/success.php",
          "operator""dev01"
    }

    3.  Response Example:

    {
          "partner_order_id""ZZZ620200303133409",
          "full_name""Hello Alpha Pay",
          "partner_name""Hello Alpha Pay",
          "channel""AlipayOnline",
          "result_code""SUCCESS",
          "partner_code""ZZZ6",
          "order_id""0240520200303141625039278",
          "return_code""SUCCESS",
          "pay_url""https://pay.alphapay.ca/api/v1.0/alipay/partners/ZZZ6/orders/ZZZ620200303133409/web_pay"
    }

    I have no idea where to start in order to integrate the above example into my webapp. Is there any hope that I can do this without having to fully learn MVC?

    Any advice will be greatly appreciated.

    Wednesday, July 29, 2020 4:44 PM

Answers

  • User-939850651 posted

    Hi engcanada,

    Recently I have been faced to integrate some API for certain usages in my web APP.

    To integrate some web api into the project, I think you can refer to link below, which shows a complete process.

    Integrating Web API with ASP.NET Razor Web Pages

    Hope this can help you.

    Best regards,

    Xudong Peng

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 30, 2020 8:00 AM