php - codeigniter CI merchant paypal -
i need paypal integration paying order. integrate api http://ci-merchant.org/. works needs to.. go paypal website, give me option pay after press pay button relocate sucess definded page , offcourse doesnt make payment. here php code paypal:
$this->load->library('merchant'); $this->merchant->load('paypal_express'); $settings = $this->merchant->default_settings(); $settings = array( 'username' => '*', 'password' => '*', 'signature' => '*', 'test_mode' => false, 'solution_type' => array('type' => 'select', 'default' => 'sole', 'options' => array( 'sole' => 'merchant_solution_type_sole', 'mark' => 'merchant_solution_type_mark')), 'landing_page' => array('type' => 'select', 'default' => 'billing', 'options' => array( 'billing' => 'merchant_landing_page_billing', 'login' => 'merchant_landing_page_login'))); $this->merchant->initialize($settings); if(isset($_post['pay'])){ $params = array( 'amount' => '0.20', 'currency' => 'usd', 'return_url' => 'pay/succesfull', 'cancel_url' => 'pay/cancel'); $response = $this->merchant->purchase($params); if ($response->success()){ echo "paid sucesfuly"; } else { $message = $response->message(); echo('error processing payment: ' . $message); exit; }
here print screen should paying completed, after pressing pay goes sucessfull website.
it sounds you're not completing process. entire flow of express checkout is...
- call setexpress checkout
- redirect user paypal token
- user reviews , clicks "continue" or "pay now" depending on integration method
- user sent return url provided in sec
- call getexpresscheckoutdetails obtain details buyer (this optional based on integration method)
- call doexpresscheckoutpayment finalize payment.
sounds you've got #1 - 4 taken care of, , maybe #5, you're missing #6. until decp called, no transaction takes place. must missing piece.
Comments
Post a Comment