<script> paypal.Buttons({ style: { shape: 'rect', color: 'gold', layout: 'vertical', label: 'paypal' }, createSubscription: function(data, actions) { return actions.subscription.create({ /* Creates the subscription */ plan_id: 'P-9PD8436790605970VMVNS5ZI', custom: 'abcdefg', }); }, onApprove: function(data, actions) { console.log("2:"); console.log(data); alert('Subscription successful'); } }).render('#paypal-button-container-P-9PD8436790605970VMVNS5ZI'); // Renders the PayPal button </script>
This is my HTML code, and there is a "custom" parameter in the order creation.
Array ( [mc_gross] => 9.80 [period_type] => Regular [outstanding_balance] => 0.00 [next_payment_date] => 02:00:00 Dec 20, 2023 PST [protection_eligibility] => Eligible [payment_cycle] => Monthly [address_status] => confirmed [tax] => 0.00 [payer_id] => CYBJ7U5KBFCJA [address_street] => [removed] [payment_date] => 06:59:43 Nov 20, 2023 PST [payment_status] => Completed [product_name] => vip menber [charset] => gb2312 [recurring_payment_id] => I-DP6KWJNK4KT1 [address_zip] => 200000 [first_name] => John [mc_fee] => 0.63 [address_country_code] => CN [address_name] => Test Store [notify_version] => 3.9 [amount_per_cycle] => 9.80 [payer_status] => verified [currency_code] => USD [business] => sb-lwbpb28275984 [address_country] => China [address_city] => Shanghai [verify_sign] => AK50lp7gRakC30DqGp1Lw3IPHQD8AbznbINVDulSpdhhyQUSy5hKiC.g [payer_email] => sb-lzlzj28275979 [initial_payment_amount] => 0.00 [profile_status] => Active [amount] => 9.80 [txn_id] => 36P02999LW315370N [payment_type] => instant [payer_business_name] => Test Store [last_name] => Doe [address_state] => Shanghai [receiver_email] => sb-lwbpb28275984 [payment_fee] => 0.63 [receiver_id] => 8HK9RPS4UN2QY [txn_type] => recurring_payment [mc_currency] => USD [residence_country] => CN [test_ipn] => 1 [transaction_subject] => vip menber [payment_gross] => 9.80 [shipping] => 0.00 [product_type] => 1 [time_created] => 06:59:43 Nov 20, 2023 PST [ipn_track_id] => f6469133efd7b )
The custom parameter is not present in the IPN echo.
... View more