For those of you familiar with using Chargify and PHP I am trying to perform what should be a simple request. I created a shopping cart using Code Igniter and now I’m trying to pass the firstname, lastname, email and overall_total on its Hosted Page URL - but I keep getting an error saying the Page is Not Found. Here is what I got so far:
<?
$site_shared_key = 'h8X9-jj2doSwOX4l__Zb';
$token = SHA1($site_shared_key);
?>
<form name="chargifySignupForm" method="get" action="https://leavereview-chargify-test.chargify.com/update_payment/2989648/<?=$token;?>">
First Name
<input type="text" name="firstname" value="<?=$firstname;?>" readonly>
Last Name
<input type="text" name="lastname" value="<?=$lastname;?>" readonly>
Email
<input type="text" name="email" value="<?=$email;?>" readonly>
<?
$overall_total = $profile_rate + $locations_rate_total;
?>
Your Overall Total (To be paid on Chargify)
<input type="text" name="overall_total" value="<?=$overall_total;?>" readonly>
<input type="submit" value="Pay Now to Chargify" />
</form>
I think the problem is on the $token part, hopefully someone can just give me a hint on how can I fix it. The documentation (http://docs.chargify.com/hosted-page-integration#hosted-page-urls) doesn’t require the API key so I'm not sure if that was still needed to make my script works.
Thanks in advance.
As per chargify documentation , you cant submit to a chargify hosted page , you just need to hyper link it to that page , and also you can make your hosted page look and feel to match with your site .
below is the documentation on hosted page Hosted page integration
If you really want to have it decoupled then give up this hosted page idea and try using API's , what ever you are achieving via Hosted page , the same thing you can achieve via API also .
Below is the documentation link from chargify
You can also get sample code here sample code
In the list of sample code for your requirement you can use ChargeIgniter - Chargify API For CodeIgniter . Which is really good to use as starting point .
Hope this helps