dongtie0929 2016-05-10 20:03
浏览 100
已采纳

工作流混乱:PayPal Cordova插件/ Magento

I am a little bit confused by the Cordova plugin by PayPal in terms of what this means for implementing a safe workflow for interacting with a Magento instance.

Normally, the Express Checkout workflow looks like this:

  1. Customer visits Magento Site checkout
  2. Customer is directed to PayPal
  3. Customer is returned to Magento Site
  4. Customer clicks 'Place Order' on Magento Site
  5. Magento Site converts quote to order
  6. Magento Site accesses PayPal to capture / confirm funds, check for possible fraud, etc...

The workflow imposed by the Cordova plugin appears to be like this:

  1. Customer visits App checkout
  2. Customer is directed to PayPal
  3. Payment is authorized or captured based upon the configuration
  4. Customer is directed back to App
  5. App executes a success handler

In the above Cordova Plugin workflow, notice that the step where a quote to order conversion is missing. From my perspective, I see two options:

Insert quote -> order conversion call between 2 and 3

Caveats:

  1. The customer may not complete checkout and now an order is permanently orphaned in the system
  2. The customer may wish to change something (which now can't happen -- orders can't be modified)

Insert quote -> order conversion call after 5

Caveats:

  1. The client is being trusted to notify the server that the payment was made (which requires server-side cross-examination with PayPal / additional complexity)
  2. The client may never actually send the notification.

I do not like any of the options presented above. Can anyone help clear up my confusion or show me what I hope that I'm missing?

  • 写回答

1条回答 默认 最新

  • dsvf46980 2016-05-13 14:01
    关注

    I've found that I am able to provide a placeholder invoice number to the Cordova application to pass on to PayPal.

    PayPal can then send this invoice number along with relevant transaction details to the Magento server via an IPN. This takes the client out of the picture and fits my needs.

    So really the workflow is as follows:

    1. The client clicks on the 'PayPal Button'
    2. A request is sent to the Magento Server to create an order and placeholder invoice
    3. The Magento Server provides the placeholder invoice number to the client
    4. The order is now 'Pending Payment' in Magento
    5. The client proceeds to PayPal to make the payment
      • If the client successfully pays, an IPN is sent to the Magento Server and the client is returned to the App payment success page
      • If the client fails to pay and fails to return to the app, the order will remain as 'Payment Pending' to be cancelled by a crontask every so often
      • If the client fails to pay and successfully returns to the app, the app will contact the Magento Server and immediately cancel the order

    I'm severely disappointed by the lack of documentation / support for this product.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Python语言实验
  • ¥15 SAP HANA SQL 增加合计行
  • ¥20 用C#语言解决一个英文打字练习器,有偿
  • ¥15 srs-sip外部服务 webrtc支持H265格式
  • ¥15 在使用abaqus软件中,继承到assembly里的surfaces怎么使用python批量调动
  • ¥15 大一C语言期末考试,求帮助🙏🙏
  • ¥15 ch340驱动未分配COM
  • ¥15 Converting circular structure to JSON
  • ¥30 Hyper-v虚拟机相关问题,求解答。
  • ¥15 TSM320F2808PZA芯片 Bootloader