You need to sign in to do that
Don't have an account?
TJMeadows
PaymentConnect Terminal not keeping query parameters
Hello community.
I'm trying to include PaymentConnect's payment terminal into a custom order wizard and have been following the supplied user guide.
Here's a snippet of the javascript to direct the user to the terminal:
The issue I'm running into is that after clicking the Review Transaction button, all of the query parameters disappear. So after confirming the transaction on the next page, there is no finishURL to send the user back to the custom order wizard.
Has anyone else run into this issue?
I'm trying to include PaymentConnect's payment terminal into a custom order wizard and have been following the supplied user guide.
Here's a snippet of the javascript to direct the user to the terminal:
goToPayment = function(){ window.location = '/apex/pymt__PaymentTerminal?' + 'csid={!quickOrder.BillToContactId}' + '&cancelURL=' + window.location + '&finishURL=' + window.location; }
The issue I'm running into is that after clicking the Review Transaction button, all of the query parameters disappear. So after confirming the transaction on the next page, there is no finishURL to send the user back to the custom order wizard.
Has anyone else run into this issue?
terminalURL = '/apex/pymt__paymentterminal?';
terminalURL = terminalURL+'id='+strPaymentId;
terminalURL = terminalURL+'&cancelURL='+EncodingUtil.urlEncode(URL.getSalesforceBaseUrl().toExternalForm()+'/apex/cancelPage?Id='+opportunityID,'UTF-8');
terminalURL = terminalURL+'&finishURL='+EncodingUtil.urlEncode(URL.getSalesforceBaseUrl().toExternalForm()+'/apex/confirmationPage?Id='+opportunityID+'&paymentid='+strPaymentId,'UTF-8');
Plese let me know if you have any question.
All Answers
But if you try to refer in the javascript andd the parameter value, you may not get it.
Try referencing the value as : {!$CurrentPage.parameters.[nameOfparam]}
Well, as a best practice why don't you save the value in some hidden variable and try using that.
terminalURL = '/apex/pymt__paymentterminal?';
terminalURL = terminalURL+'id='+strPaymentId;
terminalURL = terminalURL+'&cancelURL='+EncodingUtil.urlEncode(URL.getSalesforceBaseUrl().toExternalForm()+'/apex/cancelPage?Id='+opportunityID,'UTF-8');
terminalURL = terminalURL+'&finishURL='+EncodingUtil.urlEncode(URL.getSalesforceBaseUrl().toExternalForm()+'/apex/confirmationPage?Id='+opportunityID+'&paymentid='+strPaymentId,'UTF-8');
Plese let me know if you have any question.