Unable to get invoice in CreateRecurringPaymentsProfile repository in paypal

I intend to create a duplicate profile and pass company_id as a configurable parameter to store the IPN database, where I can create a link between payments and for which company it was done.

I read that when creating Recurring Payment Profile

to get some custom value in, IPN database

you have to pass it in a parameter PROFILEREFERENCE

and then return it from rp_invoice_id

in the response. I cannot get the desired result

My request:

$inputData = array(
            'METHOD' => 'CreateRecurringPaymentsProfile',
            'TOKEN' => $_GET['token'], //get from GetExpressCheckout
            'PAYERID' => $billerInfo['PAYERID'], //from GetExpressCheckout response
            'PROFILESTARTDATE' => date("Y-m-d h:i:s", strtotime("+5 seconds")), //2012-05-11T00:00:00Z    #Billing date start, in UTC/GMT format
            'DESC' => 'LeaveBuddy: subscription amount is $' . $bill .' for the provided service ($12 per user per year).', //#Profile description - same as billing agreement description
            'BILLINGPERIOD' => 'Year', #Period of time between billings
            'BILLINGFREQUENCY' => 1,#Frequency of charges 
            'AMT' => 10, //Todo: dynamically calculate the amt #The amount the buyer will pay in a payment period
            'CURRENCYCODE' => 'USD',#The currency, e.g. US dollars
            'COUNTRYCODE' => 'US',#The country code, e.g. US  
            'MAXFAILEDPAYMENTS' => '0',#Maximum failed payments before suspension of the profile
            'PROFILEREFERENCE' => 'companyid=1', //my custom value
        );

      

The answer I get is:

{"InstantPaymentNotification": {"ID": "553db30b-ea1c-4f68-8b5d-4fe5cbdd56cb", "notify_version": "3.8", "verify_sign": "A - 8MSCLabuvN8L.-MHjxC9uypJOv7AQ89 ":" 1 "," address_city ": null," address_country ": null," address_country_code ": null," address_name ": null," address_state ": null," address_status ": null," address_street ": null" address_zip " : null, "first_name": "code", "last_name": "booster", "payer_business_name": null, "payer_email": " codebooster@gmail.com ", "payer_id": "XXXXXXXX", "payer_status ":" verified "" contact_phone ": null," residence_country ":" USA "," business ": null," ITEM_NAME ": null," ITEM_NUMBER ": null," quantity ": null," receiver_email ":" boom @ gmail.com"" receiver_id ": null," custom ": null," invoice ": null," memo ": null," option_name1 ": null," option_name2 ": null," option_selection1 ": null," option_selection2 ": null , "tax": "0.00", "auth_id": zero, "auth_exp": zero, "auth_amount": zero, "auth_status": zero, "num_cart_items": zero, "parent_txn_id": zero, "PAYMENT_DATE" : null, "payment_status": null, "payment_type": p Ulla, "pending_reason": null, "reason_code": null, "remaining_settle": null, "SHIPPING_METHOD": null, "delivery": "0.00", "transaction_entity": null,"txn_id": "316859739", "txn_type": "recurring_payment" "EXCHANGE_RATE": null, "mc_currency": null, "mc_fee": null, "mc_gross": 10, "mc_handling": null, "mc_shipping": null , "payment_fee": null, "payment_gross": null, "settle_amount": null, "settle_currency": null, "auction_buyer_id": null, "auction_closing_date": null, "auction_multi_item": null, "for_auction": null, " subscr_date ": zero," subscr_effective ": zero," period1 ": zero" period2 ": zero" period3 ": zero," quantity1 ": zero," quantity2 ": zero," amount3 ": zero,"mc_amount1 ": null," mc_amount2 ": null," mc_amount3 ": null," duplicate ": null," retry ": null," retry_at ": null," recur_times ": null," username ": null," password ": null," subscr_id ": null," case_id ": null," case_type ": null," case_creation_date ": null," created ":" 2015-04-27 03:54:51 "," modified ": "2015-04-27 03:54:51"}, "PaypalItem": []}"subscr_id": null, "case_id": null, "case_type": null, "case_creation_date": null, "created": "2015-04-27 03:54:51", "modified": "2015-04- 27 03:54:51 "}," PaypalItem ": []}"subscr_id": null, "case_id": null, "case_type": null, "case_creation_date": null, "created": "2015-04-27 03:54:51", "modified": "2015-04- 27 03:54:51 "}," PaypalItem ": []}

So I can't find the parameter here [rp_invoice_id]

, and my invoice shows up as null as well. Can anyone tell me what I am missing?

+3


source to share





All Articles