Parsing PayPal Subscription Ran Out

前端 未结 3 1490
北海茫月
北海茫月 2020-12-19 18:11

On PayPal subscriptions, it appears that all I need to do is treat it like a regular IPN except look at the txn_type field. When I see one of the following stat

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-19 18:55

    I know i'm kind of late in this post, but here is a quick solution (php) for your question:

    switch ($_POST['txn_type']) {
        case 'cart':
              //for products without subscription
         break;
        case 'subscr_payment':
            //subscription payment recieved
            break;
    
        case 'subscr_signup':
            //subscription bought payment pending
            break;
    
        case 'subscr_eot':
           //subscription end of term
            break;
    
        case 'subscr_cancel':
            //subscription canceled
            break;
     }
    

提交回复
热议问题