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 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器