Google 在 Angular 中使用 Moneris 付款
Google Pay with Moneris in Angular
我正在尝试实施 Google 使用 Moneris Gateway 付款。我正在使用 Google-Pay-button-Angular 但如何将 Moneris 与此连接? this link里面有教程,但是不知道脚本代码在哪里写
如果您在 tokenizationSpecification
中使用 @google-pay/button-angular
, then you should specify Moneris gateway properties:
示例:
tokenizationSpecification: {
type: 'PAYMENT_GATEWAY',
parameters: {
gateway: 'moneris',
gatewayMerchantId: '<moneris merchant id>'
}
}
更完整的示例:
<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
}
我正在尝试实施 Google 使用 Moneris Gateway 付款。我正在使用 Google-Pay-button-Angular 但如何将 Moneris 与此连接? this link里面有教程,但是不知道脚本代码在哪里写
如果您在 tokenizationSpecification
中使用 @google-pay/button-angular
, then you should specify Moneris gateway properties:
示例:
tokenizationSpecification: {
type: 'PAYMENT_GATEWAY',
parameters: {
gateway: 'moneris',
gatewayMerchantId: '<moneris merchant id>'
}
}
更完整的示例:
<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
}