현재 Braintree Payment를 사용 중입니다. 임 iOS를 사용하여 대시 보드에서 결제를 성공적으로 수행 할 수있게 된 것은 클라이언트 (iOS) 응답으로 돌아가려고한다는 것입니다. 지금은 반품입니다. ""사전에 도움을 주셔서 감사합니다.Braintree Payments에서 헤더 응답을받는 방법
현재 PHP
<?php
require_once("../includes/braintree_init.php");
//$amount = $_POST["amount"];
//$nonce = $_POST["payment_method_nonce"];
$nonce = "fake-valid-nonce";
$amount = "10";
$result = Braintree\Transaction::sale([
'amount' => $amount,
'paymentMethodNonce' => $nonce
]);
내 고객
URLSession.shared.dataTask(with: request as URLRequest) { (data, response, error) -> Void in
// TODO: Handle success or failure
let responseData = String(data: data!, encoding: String.Encoding.utf8)
// Log the response in console
print(responseData);
// Display the result in an alert view
DispatchQueue.main.async(execute: {
let alertResponse = UIAlertController(title: "Result", message: "\(responseData)", preferredStyle: UIAlertControllerStyle.alert)
// add an action to the alert (button)
alertResponse.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil))
// show the alert
self.present(alertResponse, animated: true, completion: nil)
})
} .resume()
"$ processed_result ="에 대한 예제를 json serialize 할 수 있습니까? – pprevalon