Send Merchant Email Notification by Webhook or use IPN instead?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi community!
Is the merchant only get notified by email when the transaction is completed by IPN or webhooks too? I actually don't know which to use?
I use the Orders API for transaction handling.
Thank you for your help!
BR,
Chris
- Labels:
-
Payments REST APIs
-
Webhooks REST APIs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @chrisi_h91
Do you have got any idea regarding, whether a merchant email will be send by default to the payee if a transcation is done via paypal?? or we need to have do some configurations?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not use Webhook or IPN, both were a PAIN. Here the solution that I used:
// Render the PayPal button into #paypal-button-container
// by David . Nugent - Using PayPal REST V2 API Last update: 05/27/2020
paypal.Buttons({
style: {
layout: 'horizontal',
color: 'gold',
shape: 'pill',
label: 'checkout',
size: 'responsive',
tagline: 'true',
},
// Set up the transaction
createOrder: function(data, actions) {
$('#paypalmsg').hide();
$('#transmsg').show();
$('#transmsg').html('<b>'+'WAITING ON AUTHORIZATION...'+'</b>');
$('#chkoutmsg').hide()
return actions.order.create({
purchase_units: [{
description: 'GnG Order',
amount: {
value: cartTotal
}
}],
application_context: {
shipping_preference: 'NO_SHIPPING'
}
});
},
// Finalize the transaction
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
// Show a success message to the buyer
$('#transmsg').html('<b>' + 'AUTHORIZED...' + '</b>');
$('#transmsg').append('<br>'+'Transaction completed by: ' + details.payer.name.given_name +' '+ details.payer.name.surname + '<br>' + "Order Id: " + details.id + '<br>' + 'Status: PAID & APPROVED' + '<br>'+ 'Thank You For Your Order'+ '<br>');
if (details.status === "COMPLETED") {
window.setTimeout(function() {}, 500)
$('#transmsg').append('<b>' + 'Sending Order...Please Wait' + '</b>'+'<br>');
$('#transid').val(details.id);
$('#orderstat').val('APPROVED');
$('#orderform').submit(); <------Here is where I call the submit for the email form for the merchant
Here is my HTML in the form (<form id="orderform" data-form-type="order" data-result-class="rd-mailform-validate" method="post" action="bat/rd- mailform.php" class="rd-mailform offset-md-top-80 offset-top-30 z-index"> if you need the Jquery portion of that segment let me know)
}
});
if (details.error === 'INSTRUMENT_DECLINED') {
$('#transmsg').html('<b>' + 'TRANSACTION WAS DECLINED'+'</b>');
$('#transmsg').fadeIn('slow').delay(3000).fadeOut('slow', function() {
$('#paypalmsg').show();
$('#chkoutmsg').show();
$('#transmsg').empty();
});
return actions.restart();
};
},
onCancel: function(data) {
$('#transmsg').html('<b>' + 'YOUR TRANSACTION WAS CANCELLED' + '</b>');
$('#transmsg').fadeIn('slow').delay(3000).fadeOut('slow', function() {
$('#paypalmsg').show();
$('#chkoutmsg').show();
$('#transmsg').empty();
});
}
}).render('#paypal-button-container');

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Which api can get oauth2.0 authorization_code? in REST APIs
- Something went wrong. Contact the merchant for help. in PayPal Payments Standard
- NOT ENABLED TO VAULT PAYMENT SOURCE in Sandbox Environment
- Not receiving any confirmation emails for sandbox account in Sandbox Environment
- merchant onboarding in Payflow