Paypal REST api (java)를 사용하여 반복 가입을 수행하고 있습니다.Paypal REST API - 계약이 취소 되었습니까?
흐름은 다음과 같습니다, 그리고 노력 :
- 내가 내가 내가 계약을 만든 계획 (확인)
- (확인) 를 활성화 플랜 (확인)
- 을 생성
- 내가 승인 링크 (확인)를 사용하여 페이팔로 사용자를 리디렉션
- 페이팔 내 사이트 (확인)
- 내가 (확인) 계약을 실행할 수 다시 사용자를 리디렉션
나는 구매자로서 페이팔에 로그인하여 언제든지 계약을 수동으로 취소 할 수 있음을 알았습니다.
문제 : 판매자로
는, 그 구매자 x는 '지불 대시 보드를 반복 프로필>'에서 자신의 계약을 취소 볼 수 있지만 어떻게 코드를 사용하여이 정보를 조회 할 수 있습니다? 계약 ID가 있다고 가정합니다. Agreement 객체를 제공하는 정보는 없습니다.
올바른 방향으로 알려주십시오. 감사합니다
UPDATE :
내 계약 개체는 다음과 같습니다:
{
"id": "I-HLK83FVHB5X2",
"description": "item name goes here",
"start_date": "2014-12-04T05:00:00Z",
"plan": {
"payment_definitions": [
{
"type": "TRIAL",
"frequency_interval": "3",
"frequency": "Month",
"cycles": "1",
"amount": {
"currency": "CAD",
"value": "900.00"
},
"charge_models": [
{
"type": "TAX",
"amount": {
"currency": "CAD",
"value": "11.11"
}
},
{
"type": "SHIPPING",
"amount": {
"currency": "CAD",
"value": "0.00"
}
}
]
},
{
"type": "REGULAR",
"frequency_interval": "1",
"frequency": "Month",
"cycles": "0",
"amount": {
"currency": "CAD",
"value": "300.00"
},
"charge_models": [
{
"type": "TAX",
"amount": {
"currency": "CAD",
"value": "22.22"
}
},
{
"type": "SHIPPING",
"amount": {
"currency": "CAD",
"value": "0.00"
}
}
]
}
],
"merchant_preferences": {
"setup_fee": {
"currency": "CAD",
"value": "0.00"
},
"max_fail_attempts": "0",
"auto_bill_amount": "YES"
}
},
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-HLK83FVHB5X2/suspend",
"rel": "suspend",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-HLK83FVHB5X2/re-activate",
"rel": "re_activate",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-HLK83FVHB5X2/cancel",
"rel": "cancel",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-HLK83FVHB5X2/bill-balance",
"rel": "self",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-HLK83FVHB5X2/set-balance",
"rel": "self",
"method": "POST"
}
]
}
처럼은 응답 줄 것이다로서 당신은 항상 계약의 세부 정보를 검색 할 수 있습니다, 내 질문에 업데이트 된 참조하십시오. –
이 질문에 대한 대답은 Paypal REST API에 관한 것이지만이 답변은 Paypal NVP/SOAP API를 고려하고 있습니다. – fiatjaf