简体   繁体   English

使用 Javascript 智能按钮灯箱的 PayPal 访客订阅未关闭

[英]PayPal guest subscription using Javascript Smart Button light box is not closing

I've PayPal subscription javascript smart button it is working fine for paypal account login but when use guest payment using credit card, payment successfully done but light box not closing and due to that I am not getting subscription id onApprove event.我有 PayPal 订阅 javascript 智能按钮,它可以正常用于 PayPal 帐户登录,但是当使用信用卡使用访客付款时,付款成功完成但灯箱未关闭,因此我没有收到订阅 ID onApprove 事件。

paypal.Buttons({
  style: {
      shape: 'rect',
      color: 'gold',
      layout: 'vertical',
      label: 'subscribe'
  },
  createSubscription: function(data, actions) {
    return actions.subscription.create({
      'plan_id': 'my_plan_id'
    });
  },
  onApprove: function(data, actions) {
       
    console.log(data.subscriptionID);
  },
  onError: function(error) {
     console.log(error);                      
    },
  onCancel: (data, actions) => {
      console.log(data, actions);
    },
}).render('#paypal-button-container');

This is the exact scenario I am facing as well which has only recently started occurring.这也是我面临的确切情况,它最近才开始发生。 Both PayPal account and guest users were able to successfully subscribe and I was able to pull post data from the onApprove event for both. PayPal 帐户和访客用户都能够成功订阅,我能够从 onApprove 事件中为两者提取发布数据。 Now any time a guest subscribes ie uses their credit card without creating a PayPal account, the lightbox is not closing and PayPal's standard confirmation page is displayed which is no good for me as I need the confirmation of the subscription to be passed to the onApprove event.现在,只要客人订阅即使用他们的信用卡而不创建 PayPal 帐户,灯箱不会关闭,并且会显示 PayPal 的标准确认页面,这对我没有好处,因为我需要将订阅确认传递给 onApprove 事件. Its best to ask PayPal for assistance in this matter as its quite a serious error.最好向 PayPal 寻求帮助,因为这是一个非常严重的错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM