I am trying to implement Google Pay with Moneris Gateway. I am using Google-Pay-button-Angular but how can I connect Moneris with this? There is a tutorial in this link but I don't know where to write script code.
1 Answer
If you are using @google-pay/button-angular, then you should specify Moneris gateway properties in tokenizationSpecification:
Example:
tokenizationSpecification: { type: 'PAYMENT_GATEWAY', parameters: { gateway: 'moneris', gatewayMerchantId: '<moneris merchant id>' } } More complete example:
<google-pay-button environment="TEST" buttonType="buy" buttonColor="black" [paymentRequest]="{ apiVersion: 2, apiVersionMinor: 0, allowedPaymentMethods: [ { type: 'CARD', parameters: { allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'], allowedCardNetworks: ['AMEX', 'VISA', 'MASTERCARD'] }, tokenizationSpecification: { type: 'PAYMENT_GATEWAY', parameters: { gateway: 'moneris', gatewayMerchantId: '<moneris merchant id>' } } } ], merchantInfo: { merchantId: '12345678901234567890', merchantName: 'Demo Merchant' }, transactionInfo: { totalPriceStatus: 'FINAL', totalPriceLabel: 'Total', totalPrice: '100.00', currencyCode: 'USD', countryCode: 'US' } }" (loadpaymentdata)="onLoadPaymentData($event)" ></google-pay-button> // handle the event onLoadPaymentData(event) { // call your backend server to process the payment including details from event.detail } 12 Comments
qaxim al
Thanks for helping. There is no need of a function MonerisGooglePay in link above?
Soc
These are different integrations. If you're using the Moneris APIs (i.e.
https://esqa.moneris.com/googlepay/googlepay-api.js), then you should refer to their documentation. The answer above is for @google-pay/button-angular.qaxim al
I am following this (developer.moneris.com/Documentation/NA/E-Commerce%20Solutions/…) documentation. Is it correct to implement on Angular? If yes, where to add step 2,3 and 4?
Soc
If you're following the Moneris guide, then you shouldn't be using the Angular component as I think it is responsible for creating the button for you. Steps 2 and 3 would go into your page's HTML. Step 4 would go into either your JS file or in a
script tag.qaxim al
If I use Angular component, then I don't need to add moneris script and web-merchant-key?
|