Support » Plugin: Paystack Add-On for Gravity Forms » Customer information_Lastname and currency not supported error on submission

  • Good day,

    I made a form with the Paystack Gravity plugin and from the onset, I knew there would be issues as I wasn’t given an option to change currency. Also I got an undefined index error for the customers formation_firstName and last name fields.

    Please any help out there? Or is this plugin addon still a work in progress?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello bro,

    Please how do you go about the integration. I have downloaded and activated the gravity form, downloaded and activated the paystack addon for gravity form but when I create the form and they submit, how do they then pay?

    what do I need to add to the form?

    @danieltobs firstly you need to change your currency from gravityforms settings , secondly to solve the redirection issues then you can try to use paystack callbacks to verify transaction cause it carrys back some params such as https://yoursite.com/?gf_paystack_return=aWRzPTZ8MXwxJmhhc2g9MTdhMjQ3YWY3YjRkODlhYzM4OTEwZjI1ZmI2ZDQ5YWM&trxref=gf-6-60e5ae3037337&reference=gf-6-60e5ae3037337

    All you need to do is create a page called “/success” then go add this page on your paystack dashboard then download and activate code snippets plugin and paste the below code in the code snippets or your functions.php

    function success(){
    	
    	$trxref = $GET['trxref'];
    
    $curl = curl_init();
      
      curl_setopt_array($curl, array(
        CURLOPT_URL => "https://api.paystack.co/transaction/verify/:$trxref",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => "",
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 30,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => array(
          "Authorization: Bearer sk_live_YOUR KEYS",
          "Cache-Control: no-cache",
        ),
      ));
      
      $response = curl_exec($curl);
      $err = curl_error($curl);
      curl_close($curl);
      
      if ($err) {
        echo "cURL Error #:" . $err;
      } else {
        echo $response;
      }
    }
    add_shortcode('success','success');

    Then add [success] shortcode to the page !
    you then customize your response in the above code to get your json response as html

    • This reply was modified 1 year, 6 months ago by ZaacWilliam.

    @omo9jatoja Thanks so much for your input.

    Please, this part:

    “Then add [success] shortcode to the page !
    you then customize your response in the above code to get your json response as html”

    Where are we to customise the response and…

    Is it possible to edit the success page with a page builder and use a different response?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Customer information_Lastname and currency not supported error on submission’ is closed to new replies.