Top 5 Benefits of Resume Writing Services
In this highly competitive market lot of people are striving for the same opportunity. Booking resume writing service is widely…
// ... existing code ...
$api_key = get_option('ipf_api_key');
$auth_token = get_option('ipf_auth_token');
$is_test_mode = get_option('ipf_is_test_mode', '1');
if (empty($api_key) || empty($auth_token)) {
wp_die('Instamojo API credentials are not configured. Please contact the administrator.');
}
// Always use the production endpoint as test endpoint is having issues
$api_endpoint = 'https://api.instamojo.com/api/1.1/';
// Include Instamojo API
require_once plugin_dir_path(__FILE__) . 'src/Instamojo.php';
try {
// Test the connection first
if (!function_exists('curl_init')) {
throw new Exception('cURL is not installed. Please install PHP cURL extension.');
}
// Check if we can resolve the host
$host = 'api.instamojo.com';
if (gethostbyname($host) === $host) {
throw new Exception('Unable to resolve Instamojo server. Please check your internet connection or DNS settings.');
}
$api = new Instamojo\Instamojo($api_key, $auth_token, $api_endpoint);
$response = $api->paymentRequestCreate([
'purpose' => 'Website Payment',
'amount' => $amount,
'buyer_name' => $name,
'email' => $email,
'phone' => $phone,
'redirect_url' => add_query_arg('payment-callback', '1', get_permalink()),
'send_email' => true,
'webhook' => home_url('/?instamojo_webhook=1'),
'allow_repeated_payments' => false,
]);
if (isset($response['longurl']) && !empty($response['longurl'])) {
wp_redirect($response['longurl']);
exit();
} else {
throw new Exception('Invalid response from Instamojo. Please check your API credentials.');
}
} catch (Exception $e) {
error_log('Instamojo Payment Error: ' . $e->getMessage());
wp_die('Payment Error: ' . esc_html($e->getMessage()) . '
Please contact the administrator or try again later.');
}
}
// ... rest of the code ...
In this highly competitive market lot of people are striving for the same opportunity. Booking resume writing service is widely…
A resume comprised of several required sections including your contact information, work experience, Skills, and education. The most important area…
This is one of the tricky questions that often asked by interviewers. But generally, people don't know the right way…
A resume is limited to qualifications, skill, and achievements and that’s why cover letter comes in action. The cover letter…
Creating a professional and powerful resume is the key to impressing an employer. Your resume is often the first impression…
Having a good and effective resume is crucial in today's job market. Your resume is often the first impression that…