2013-01-17 49 views
0

對於那些熟悉使用Chargify和PHP的人,我試圖執行一些簡單的請求。我使用Code Igniter創建了一個購物車,現在我正在嘗試在其Hosted Page URL上傳遞名字,姓氏,電子郵件和overall_total - 但我不斷收到一條錯誤消息,指出該頁面未找到。 這是我走到這一步:Chargify利用PHP集成託管頁面URL集成

<? 
$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> 

我認爲這個問題是在$標記部分,希望有人能不能給我我如何能解決它的提示。該文檔(http://docs.chargify.com/hosted-page-integration#hosted-page-urls)不需要API密鑰,因此我不確定是否仍然需要使我的腳本正常工作。

在此先感謝。

回答

0

根據chargify文檔,你不能提交到一個chargify託管頁面,你只需要超鏈接到該頁面,並且你可以讓你的託管頁面的外觀和感覺與你的網站相匹配。

下面

是託管的網頁上的文檔Hosted page integration

如果你真的想擁有它脫鉤然後放棄這個託管的頁面的想法,並嘗試使用API​​的,什麼都您是通過託管的網頁實現,你可以在同樣的事情也通過API實現。

下面是chargify

API integration notes

的文檔鏈接也可以在這裏sample code

示例代碼中的示例代碼爲您的要求清單,你可以使用ChargeIgniter - Chargify API For CodeIgniter。作爲出發點,這真的很好。

希望這有助於

+0

從chargify支持: 這是不可能的待發送的祈禱,到託管頁面的數量。 您也正在計算共享密鑰錯誤。 此外,update_payment頁面不處理費用。它僅用於更新卡信息。 – sai