I have implemented MPGS in my webiste. I followed this link for the integration.https://network.gateway.mastercard.com/api/documentation/integrationGuidelines/hostedCheckout/integrationModelHostedCheckout.html. Everything seems to be working. After successful transaction, I am redirected to receipt.php file. I would like to verify whether the payment was successful.If possible,how can I achieve?Should I need to create a cron job or something in PHP to check if it was successful or not
<script src="https://network.gateway.mastercard.com/checkout/version/51/checkout.js"
data-error="<?php echo $_SESSION['home_url'].'/errorpage';?>"
data-cancel="<?php echo $_SESSION['home_url'].'/cancelpage';?>"
data-complete="<?php echo $_SESSION['home_url'].'/receipt';?>"
data-timeout="<?php echo $_SESSION['home_url'].'/timeout';?>"
>
The gateway sends the result of the payment in a resultIndicator
parameter, which is either:
interaction.returnUrl
) used for returning the payer to your shop site, ORYou can determine the success of the payment by comparing the resultIndicator
and the successIndicator
parameters. A match indicates that the payment has been successful.