Happy Business Starts Here

Payment Method ID in Quote is getting overwritten

Highlighted
Zuora Alumni

Payment Method ID in Quote is getting overwritten

Problem:

 

We are creating a zuora quote when a lead converts and attaching the quote to opportunity. We have a custom button called "Send payment Link" which will sends mail to quote contact with the payment link. We are using zuora hosted pages here to capture the credit card details. Once the user submits the details, the Zuora payment Id is getting populated in the quote. When i send the quote to Zuora the value is getting blank. I have noticed the payment method is created in Zuora but not yet linked to Customer account. When the quote sends to Zuora, subscription is created but there are no payment methods to the customer account.

 






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Zuora Alumni

Re: Payment Method ID in Quote is getting overwritten

Solution:

 

After creating a payment method via Hosted Payment Page, we must pass the PaymentMethodId to the quote's Electronic Payment Method ID field (zqu__ElectronicPaymentMethodId__c).

Set the quote's Electronic Payment Method ID field (zqu__ElectronicPaymentMethodId__c)

 

electronicPaymnetMethodId.png

 

Then we  can call zQuoteUtil.sendToZBilling Method .

 

List<zqu.zQuoteUtil.ZBillingQuoteCollection> quotes = new List<zqu.zQuoteUtil.ZBillingQuoteCollection>();

zqu.zQuoteUtil.ZBillingQuoteCollection quote = new zqu.zQuoteUtil.ZBillingQuoteCollection();
quote.sfdcAccountId = '001N000000jJC6j'; // SFDC CRM Account ID
quote.zAccountId = 'new'; // Zuora Billing Account ID
quote.quoteRequests = new List<zqu.zQuoteUtil.ZBillingQuoteRequest>();
zqu.zQuoteUtil.ZBillingQuoteRequest req = new zqu.zQuoteUtil.ZBillingQuoteRequest();
req.paymentMethodId = '2c92c0f8549a134f01549ffbd75d5d5d'; // Electronic Payment Method ID
req.sfdcQuoteId = 'a0gN0000007b5t1'; // SFDC Quote ID
quote.quoteRequests.add(req);

quotes.add(quote);





If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

View solution in original post

1 REPLY 1
Highlighted
Zuora Alumni

Re: Payment Method ID in Quote is getting overwritten

Solution:

 

After creating a payment method via Hosted Payment Page, we must pass the PaymentMethodId to the quote's Electronic Payment Method ID field (zqu__ElectronicPaymentMethodId__c).

Set the quote's Electronic Payment Method ID field (zqu__ElectronicPaymentMethodId__c)

 

electronicPaymnetMethodId.png

 

Then we  can call zQuoteUtil.sendToZBilling Method .

 

List<zqu.zQuoteUtil.ZBillingQuoteCollection> quotes = new List<zqu.zQuoteUtil.ZBillingQuoteCollection>();

zqu.zQuoteUtil.ZBillingQuoteCollection quote = new zqu.zQuoteUtil.ZBillingQuoteCollection();
quote.sfdcAccountId = '001N000000jJC6j'; // SFDC CRM Account ID
quote.zAccountId = 'new'; // Zuora Billing Account ID
quote.quoteRequests = new List<zqu.zQuoteUtil.ZBillingQuoteRequest>();
zqu.zQuoteUtil.ZBillingQuoteRequest req = new zqu.zQuoteUtil.ZBillingQuoteRequest();
req.paymentMethodId = '2c92c0f8549a134f01549ffbd75d5d5d'; // Electronic Payment Method ID
req.sfdcQuoteId = 'a0gN0000007b5t1'; // SFDC Quote ID
quote.quoteRequests.add(req);

quotes.add(quote);





If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

View solution in original post