Custom message after successful payment in Subscription button code.

geej-mauriva
New Community Member

Hi there, I have a subscription button code that I'm embedding on my website and in the code there's a place where you have a custom message after successful payment.

 

Where exactly do I put the message in this code:

 

onApprove: function(data, actions) {

alert(data.subscriptionID); // You can add optional success message for the subscriber here

}

Do I put it before the ; or after the } ?  Where exactly?

Login to Me Too
1 REPLY 1

Here-to-help
Contributor
Contributor

Hi @geej-mauriva ,

 

You can add a custom message within the onapprove function, after {

 

onApprove: function(data, actions) {

 // You can add optional success messages for the subscriber here

}

 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.