cancel
Showing results for 
Search instead for 
Did you mean: 

getting the response like below for the payment form

What is the steps to get the Payment Form

While trying to send the request using access token getting below response...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">

<head id="Head1"><title>
Secure Information
</title>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]&#124;&#124;[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-KFWQGNC');</script>
<!-- End Google Tag Manager -->
<script src="https://assets.secure.checkout.visa.com/checkout-widget/resources/js/integration/v1/sdk.js" type="text/javascript" > </script>
<script type="text/javascript">
var g_token = "null";
var g_merchantData = null;
var g_pageOptions = null;
var g_paymentProfiles = null;
var g_maxPaymentProfiles = false;
var g_errorPanelMessage = "Missing or invalid token.";
var g_siteKey = "6Lc8tgYAAAAAAFfalsuPuIZ6bv_2dGT_Y9ZxURiK";
var g_visaCheckoutUrl = "https://secure.checkout.visa.com/wallet-services-web/xo/button.png";
</script>

<script type="text/javascript">
var g_EcheckEnabled = false;
var g_CreditEnabled = false;
</script>
<base href="./Scripts/v1/">
</head>
<body>
<div class="PageOuter" id="divPageOuter">
<div id="divPopupScreen" class="PopupScreen" style="display:none;"></div>
<div class="Page" id="divPage">
<div class="PageMain container" id="divPageMain container">

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KFWQGNC"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<app-accept-payment></app-accept-payment>

<link href="styles.bundle.css" rel="stylesheet"/>
<script type="text/javascript" src="inline.bundle.js"></script>
<script type="text/javascript" src="polyfills.bundle.js"></script>
<script type="text/javascript" src="scripts.bundle.js"></script>
<script type="text/javascript" src="main.bundle.js"></script>

</div>
<div class="PageMainAfter"></div>
</div>
</div>
</body>

-------------------------------------------

Sample Code to send the request::::::::

HttpRequest req1 = new HttpRequest();
req1.setEndpoint('https://accept.authorize.net/payment/payment');
req1.setHeader('Authorization', 'Bearer '+accTokn);
req1.setHeader('Content-Type', 'application/json');
req1.setHeader('Content-Length', '0');
//req1.ContentLength = 0;
req1.setMethod('POST');
//req1.setBody(json);
System.debug('request body::'+json);
Http h1 = new Http();
// Send the request, and return a response
HttpResponse res1 = new HttpResponse();
system.debug('req body############'+req1);
res1 = h1.send(req1);
String responseBody1 = res1.getBody();

 

Ganeshc01
Member
1 REPLY 1

Same Problem bro

rootajoe4
Member