MySagePay
Login >

Direct Integration - PayPal Payments

If you are using our Direct method of integration and you would like to offer your shoppers the option to use a PayPal account to process a transaction you will need to make some changes to the information that you send to us.

How does it work?

When you process a transaction using PayPal the original communication between your website and ours will be completed as normal.

You will however need to change the CardType field to include PAYPAL as the value which will allow us to identify that you want to use PayPal as the payment method.

Along with this you will also include PayPalCallbackURL in this post that is used to re-direct your shoppers too after they have completed the transaction.

Once we have this information from you, we will build a request and send this onto PayPal for the transaction session to be built.  PayPal will then reply back to us with a PayPalRedirectURL and a unique TOKEN for the transaction.

We will then store the transaction on our system and send the PayPalRedirectURL onto you.

Your system will then use the PayPalRedirectURL to send your shopper through to PayPal so they can log into their own account and confirm the payment.

PayPal will then communicate with us to confirm the transaction has been processed. 

We then build a response with all of the transactional information and send this to your PayPalCallbackURL that you supplied when registering the transaction.

After this has been received by your systems you will need to build a reply to this and send this onto us using our PayPalCompletionURL.  This will include the Accept field with either “YES” or “NO” as the value.

This is then sent onto PayPal who will then complete the transaction and return the details back through to us.

Our systems will then update the transaction and send a completion message back to you. 

You will then send your shopper onto your successful or failed pages so they can see the outcome of their transaction.

Sage Pay Direct and PayPal integration map

 

Is this all I have to do?

Unfortunately not, alongside making changes to the information that your website send through to us with the transaction registration you will also need to link your PayPal account to MySagePay.

Also once you have added the details to the registration and linked your account you will need to send a request to our support team to add the “Complete” payment type onto your account.

This will then set up both your Sage Pay and PayPal accounts to process transactions together.

How do I get started?

If you are happy with how this works and you are ready to start using PayPal as a payment type you will find all of the information you need in our protocol guides.